1.1.1 • Published 4 years ago

fast-unique-id v1.1.1

Weekly downloads
9
License
ISC
Repository
github
Last release
4 years ago

fast-unique-id

fast-unique-id is a super lightweight package written in typescript that allows you generate universal unique identifier (non-standard) in 18 characters.

Installation

npm i fast-unique-id

Usage

import * as uniqueID from 'fast-unique-id';

console.log(uniqueID.fast());
//68kUVYfj05caqmg0PL

console.log(uniqueID.timestamp());
//68kUVYk4gw9lp3ENRP

Format & Performance

MethodLengthFormatPerformance (Ryzen 5 1600)
uniqueID.fast()18pid + prefix + timestamp + random suffix1904761 ops/sec
uniqueID.timestamp()18pid + prefix + init timestamp + offset + random suffix916590 ops/sec

Collision

  • multi thread safe
  • no collision risk under 1000 ids/sec on average
  • any time related functions will be working fine before human extinction
1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago