Skip to content
Malexion edited this page Nov 3, 2016 · 1 revision

__.gen.guid([options])

  • [options] [Optional] options block with params, { separator: '-', map: null }

Examples

console.log(__.gen.guid()); // format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

var store = {}; // Store them to prevent the unlikely event of duplication
console.log(__.gen.guid({ map: store }));
console.log(store);

console.log(__.gen.guid({ separator: '' })); // Change the separator
Clone this wiki locally