bs-shortid

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i bs-shortid

Weekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

162 kB

Total Files

18

Last publish

Collaborators

  • srsholmes