@webhandle/id-generator
v1.0.6
Published
Generates a 32 byte (256 bit) random ID, encoded as a base64Url.
Readme
Generate ID
Generates a 32 byte (256 bit) random ID, encoded as a base64Url.
It's pretty simple. Its virtues are that it's safe to use a base64url encoded string as part of a URL and that there's code for modules, Common JS, and browsers.
Install
npm i @webhandle/id-generatorUsage
import generateId from '@webhandle/id-generator'
let id = generateId()const generateId = require('@webhandle/id-generator')
let id = generateId()Note
Older versions of webpack have a bug which makes them mishandle the export section, causing them to select a file other than the one specified for browsers and generating errors during the build.
