psuid
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

PSUID

JavaScript Style Guide

A sortable unique id containing a hash of a generated process fingerprint along with random bytes, a timestamp, and a counter.


Table of Contents


Install

npm i psuid

Components:

4 byte timestamp

2 byte counter

9 random bytes

5 byte process fingerprint hashed using SHA-3


Usage

import PSUID from 'psuid'

const psuid = new PSUID()
const psuidString = psuid.toString() // EK2RJBUM-WUUXMV63-K8BDY49Z-1K3GS472
const psuidRevived = new PSUID('EK2RJBUM-WUUXMV63-K8BDY49Z-1K3GS472')

Package Sidebar

Install

npm i psuid

Weekly Downloads

1

Version

1.0.0

License

none

Unpacked Size

24.1 kB

Total Files

7

Last publish

Collaborators

  • clyng57