js-uuid is an browser wrapper for Robert Kieffer's node-uuid, which provides simple, fast generation of RFC4122 UUIDS. Based on munkychop's fork angular-uuid.
- Generate RFC4122 version 1 or version 4 UUIDs
- Cryptographically strong random # generation on supporting platforms
- Tiny file size when minified.
If using CommonJS then simply require js-uuid as per usual:
npm install --save js-uuid
require("js-uuid");
// ES6
import uuid from 'js-uuid';
Otherwise use a regular script tag:
<script src="js-uuid.js"></script>
<script>uuid.v4();</script>
Full documentation is available via the original project's readme: https://github.com/broofa/node-uuid/blob/master/README.md