
rng - (Function) Random # generator to use.random - (Number) Array of 16 numbers (0-255) to use in place of randomly generated values.Uuid.v1( null, arr, 16) // -> // Optionally use uuid.unparse() to get stringify the ids (Future versions of this module may use persistent storage mechanisms to extend this guarantee.)Įxample: Generate string UUID with fully-specified options uuid.v1() // -> "710b962e-041c-11e1-9234-0123456789ab"Įxample: In-place generation of two binary IDs // Generate two ids in an array var arr = new Array( 32) // -> The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime.Returns buffer, if specified, otherwise the string form of the UUID offset - (Number) Starting index in buffer at which to begin writing.Default: internal uuid counter is used, as per 4.2.1.2.īuffer - (Array | Buffer) Array or buffer where UUID bytes are to be written. nsecs - (Number between 0-9999) additional time, in 100-nanosecond units.msecs - (Number | Date) Time in milliseconds since unix Epoch.Default: An internally maintained clockseq is used. clockseq - (Number between 0 - 0x3fff) RFC clock sequence.node - (Array) Node id as Array of 6 bytes (per 4.1.6).Options - (Object) Optional uuid state to apply. Generate and return a RFC4122 v1 (timestamp-based) UUID.



Node uuid generator install#
Or in node.js: npm install node-uuid var uuid = require( 'node-uuid') 1.1K minified and gzip'ed (Want something smaller? Check this crazy shit out! ).Cryptographically strong random # generation on supporting platforms.Registered as a ComponentJS component ('broofa/node-uuid').Generate RFC4122 version 1 or version 4 UUIDs.Simple, fast generation of RFC4122 UUIDS.
