JSPM

pin-generator

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q21481F
  • License MIT

JavaScript library to generate random pin codes

Package Exports

  • pin-generator

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pin-generator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pin-generator

A simple JavaScript utilty library to generate random pin codes.

Installation

$ yarn add pin-generator

# or

$ npm install pin-generator

Usage

import generatePin from "pin-generator";

generatePin(); // returns a 4-digit pin

You can also specify the number of digits you want by calling the generatePin method with an argument

generatePin(6); // 6-digit pin

License

MIT © Eyuel Berga