psuid
v1.0.0
Published
A sortable unique id containing a hash of a generated process fingerprint along with random bytes, a timestamp, and a counter.
Downloads
2
Maintainers
Readme
PSUID
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')