gravity-betslip-identity

1.0.0 • Public • Published

Gravity Betslip Identity

This library implemets Gravity Betslip Identity parser and generator.

Using

Library exposes two main static methods:

  • generate: Generate hash from id
  • parse: Parse id from hash

Example:

const prefix = 'XX';
const salt = 'abcdef0000';
 
const parse = BetslipIdentity.parse('XX1X8MTTR', salt, prefix);
const generate = BetslipIdentity.generate(1000, salt, prefix);

Both methods return same data:

  • prefix
  • id
  • hash

Running tests

To run unit tests on whole library run:

npm test

Contributing

To contribute to this library, please create pull request against master branch.

Publishing

To publish run command:

npm publish

When publishing, npm will automatically run tests.

It is very important that you set valid version in package before publishing.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i gravity-betslip-identity

    Homepage

    nsoft.com

    Weekly Downloads

    3

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • manico_