1.0.0 • Published 1 year ago

psuid v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

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')