Be the first user to complete this post

  • 0
Add to List

nodejs: generate uuid / guid

node-uuid provide a simpler and reliable way to create unique id. It is rigorous implementation of RFC4122 (v1 and v4) UUIDs.

// npm i node-uuid
var uuid = require('node-uuid');

// Generate a v1 (time-based) id

// Generate a v4 (random) id

Also Read:

  1. Split a string in javascript when both comma and spaces are present
  2. center using css
  3. JavaScript Promises - Visualized
  4. css - circular profile pictures
  5. Getting the parameters and arguments of a javascript function
  6. How to publish a package on npm
  7. position: relative
  8. Promise javascript examples