Provides functionality for creation of uuids.
Implemented by instructions of https://www.famkruithof.net/guid-uuid-random.html
Supports both CommonJS and AMD eco system. If there is no loader, Uuid is registered as a browser variable.
- Use it as browser variable
// Generates an uuid formatted like:
// 00000000-0000-0000-0000-000000000000
var uuid = Uuid.generate();
- Use it with require.js
require(["path/to/Uuid"], function(Uuid){
// Work with Uuid
});
- Use it with node.js
var Uuid = require("jean-uuid");
npm install jean-uuid --save --legacy-bundling
Generates a uuid
Returns
String
- The generated uuid
- Open spec/spec-runner.html in browser to see the test cases.
MIT