0.0.1 • Published 6 years ago

bs-shortid v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

bs-shortid

Bucklescript/Reason bindings for shortId

Installation

npm install --save bs-shortid

In 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