Fast UUID Generator & Parser In JavaScript – lsp-uuid

Category: Javascript | October 1, 2021
Author:ryouaki
Views Total:54 views
Official Page:Go to website
Last Update:October 1, 2021
License:MIT

Preview:

Fast UUID Generator & Parser In JavaScript – lsp-uuid

Description:

A lightweight and fast UUID (universally unique identifier) generator & parser for both browser and node.js.

How to use it:

1. Install and import the lsp-uuid.

# NPM
$ npm i lsp-uuid
import { uuid, parseUUID } from 'lsp-uuid'

2. Generate a UUID.

const id = uuid()
// => 5f0d49fa5880000

3. Parse a UUID.

parseUUID(id)
/*
{
  flg: 0, 
  timestamp: 1632979380578, 
  count: 0
}
*/

You Might Be Interested In:


Leave a Reply