npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@amazon-devices/kepler-identifiers

v0.2.1

Published

## Overview

Downloads

8,496

Readme

@amazon-devices/kepler-identifiers

Overview

@amazon-devices/kepler-identifiers provides Identifiers API support to Kepler. The module provides functionality for generating and retrieving and managing identifiers such as UUIds, device name and user agent and tracking/ad identifiers.

Getting Started

Installation

  1. Add the JavaScript library dependency in the package.json file:
"dependencies": {
...
"@amazon-devices/kepler-identifiers": "~0.0.1"
}
  1. Regenerate the package-lock.json file using the npm install command.

Common Use Cases

Generate UUID v4

import { KeplerIdentifiers as Identifiers } from '@amazon-devices/kepler-identifiers';

const handleGenerateUuidV4 = () => {
  try {
    let result = Identifiers.generateUuidV4()
    return result;
  }catch (error) {
    console.error(error);
  }
};

Set Friendly Device Name

import { KeplerIdentifiers as Identifiers } from '@amazon-devices/kepler-identifiers';

const handleSetFriendlyDeviceName = async () => {
  try {
    await Identifiers.setFriendlyDeviceName("newfriendlydevicename");
    console.log("New friendly device name set");
  } catch (error) {
    console.error("Failed to set friendly device name:", error);
  }
};

Get Friendly Device Name

The method getFriendlyDeviceName() gets the friendly name of this device for the current persona.

Returns one of:

  • The user-customized device name if it exists and the caller has the "com.amazon.devconf.privilege.identifiers.device-friendly-name" run-time privilege
  • The device model name if either:
    • No user-customized name has been set
    • The caller lacks the required privilege
import { KeplerIdentifiers as Identifiers } from '@amazon-devices/kepler-identifiers';

const handleGetFriendlyDeviceName = async () => {
  try {
    let result = await Identifiers.getFriendlyDeviceName();
    return result;
  }catch (error) {
    console.error(error);
  }
};
Requesting for the run-time privilege

Privilege can be acquired by getting the user consent. User consent dialogue can be initiated by requesting run-time privilege "com.amazon.devconf.privilege.identifiers.device-friendly-name" through Security Manager API "@amazon-devices/security-manager-lib".

import {SecurityManager, PrivilegeState} from '@amazon-devices/security-manager-lib';
import { KeplerIdentifiers as Identifiers } from '@amazon-devices/kepler-identifiers';

const DEVICE_NAME_PRIVILEGE = 'com.amazon.devconf.privilege.identifiers.device-friendly-name';
SecurityManager.getPrivilegeState(DEVICE_NAME_PRIVILEGE).then(
      function(state: PrivilegeState) {
        if (state == PrivilegeState.ALLOW) {
          // User had consented.
          return Identifiers.getFriendlyDeviceName();
        } else {
          // Request for user consent
          // This call blocks, each app will integrate this call into their threading model or event loop
          SecurityManager.requestPrivilege(DEVICE_NAME_PRIVILEGE).then(
            function(state: PrivilegeState) {
              if (state == PrivilegeState.ALLOW) {
                // User has consented now.
                return Identifiers.getFriendlyDeviceName();
              } else {
                // User didn't consent.
              }
            },
            function(error: Object) { KPLOG().error("Failed to request privilege: {}", error["message"]); }
          )
        }
      },
      function(error: Object) { KPLOG().error("Failed to get privilege state: {}", error["message"]); }
    )

Additionally add the following to application manifest.toml,

 [[needs.privilege]]
 id = "com.amazon.devconf.privilege.identifiers.device-friendly-name"

See Request Run-time Privileges and Security Manager API for more details.