sequential-uuid

1.0.0 • Public • Published

sequential-uuid

A Node.js utility for generating timestamp based sequential uuid.

Usage

After installing with npm i sequential-uuid :

const SequenceUUID = require('sequential-uuid')
const uuid = new SequenceUUID()
uuid.generate() // '5d6865a2-8184-a0a4-98b5-a8c8d4931f01'

Options

Name Description Type Default
dashes Toggle dashes separation bool true
valid Generate only valid UUID v4 bool false
unsafeBuffer Use unsafe buffer allocation (for better performance) bool false

Options can be passed as object:

const uuid = new SequenceUUID({
  valid: true,
  dashes: false,
  unsafeBuffer: true
})

Generated UUID

All UUID's generated by this library are built with 4 bytes of timestamp and 12 secure random bytes generated with crypto library.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i sequential-uuid

      Weekly Downloads

      115

      Version

      1.0.0

      License

      MIT

      Unpacked Size

      3.95 kB

      Total Files

      4

      Last publish

      Collaborators

      • maxtomczyk