0.0.1 • Published 7 years ago
bs-shortid v0.0.1
bs-shortid
Bucklescript/Reason bindings for shortId
Installation
npm install --save bs-shortidIn your bsconfig.json, include "bs-shortid" in the bs-dependencies.
Usage
See __tests__/ShortId_test.re for sample usage.
/* Generate an ID */
let myId = ShortId.generate();
/* Check if ID is valid */
let myVal = ShortId.isValid(yId);
/* Get characters of short Id */
let myDict = ShortId.characters();
/* Set characters of short Id */
let myDict = ShortId.characters(~chars="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$@", ())Development
npm run start0.0.1
7 years ago