fsid
v1.0.4
Published
更加快速/精简的uuid生成器/A Faster & Simpler uuid generator
Downloads
26
Readme
A faster(f) & Simpler(s) uuid generator
Function Inside
buildUUID
buildShortUUID
Usage
const fsid = require('fsid')
console.log(fsid)
// {
// __esModule: true,
// buildUUID: [Function: buildUUID],
// buildShortUUID: [Function: buildShortUUID]
// }
// Base: length 32 uuid
fsid.buildUUID()
// console:
// 'd8a7100874be45719b2e3cb7fcf73fd6'
// Base: length 24 uuid
fsid.buildShortUUID()
// console:
// '_88136188821659679135184'
// Add an custome prefix
const prefix = 'usr_'
fsid.buildShortUUID(prefix)
// console:
// 'usr_88136188821659679135184'
Installation
- Please use
npm/yarn
install this package
npm i fsid --save
# or
yarn i fsid --save
import
orrequire
what you need
// in node.js
const fsid = require('fsid')