How to use the uuidjs.generate function in uuidjs

To help you get started, we’ve selected a few uuidjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LiosK / UUID.js / example.js View on Github external
const UUID = require("uuidjs")

// Generate UUID string
console.log(UUID.generate())

// Create UUID objects and get string representations
console.log(UUID.genV4().toString())
console.log(UUID.genV1().hexNoDelim)
console.log(UUID.parse("84d9ca79-4d66-4373-91a0-a12d673e71be").urn)

// Get UUID internal field values
console.log(UUID.genV4().hexFields.node)
console.log(UUID.genV1().intFields.timeLow)
console.log(UUID.genV4().bitFields[2])

UUID.genV1()

uuidjs

RFC-compliant UUID Generator for JavaScript

Apache-2.0
Latest version published 6 months ago

Package Health Score

58 / 100
Full package analysis