Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gravity-betslip-identity

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gravity-betslip-identity

Gravity Betslip Identity Parser and Generator

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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.

Keywords

FAQs

Package last updated on 13 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc