bs-shortid
v0.0.1
Published
Bucklescript/Reason bindings for [shortId](https://github.com/dylang/shortid)
Downloads
2
Readme
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 start