JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 60588
  • Score
    100M100P100Q155854F
  • License ISC

Node UUID v4 Generator

Package Exports

  • uuid4

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (uuid4) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

uuid4

A Node.js module for generating and validation V4 UUIDs

Note v1.1 adds a browser entry for use in browsers, crypto api for rng in modern browser, fallback to Math.random()

Install

$ npm install uuid4

Usage

var uuid4 = require('uuid4');

// Generate a new UUID
var id = uuid4();

// Validate a UUID as proper V4 format
uuid4.valid(id);  // true

// NODE ONLY: Generate a new UUID Asynchronously
uuid4(function(err, id){
  //if (err) ...;

  //verify id
  uuid.valid(id);
});