numcode
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

numcode

6️⃣7️⃣ Generating codes is easy and simple.

All Contributors Build Status npm david Hits-of-Code GitHub

Installation

yarn add numcode
# or 
npm install -s numcode

Usage

For ES6 or ESNext

import { numcode } from 'numcode';

For CommonJS

const { numcode } = require('numcode');
console.log(numcode());
Output should be '1998'

API

numcode(length)

Returns string unique id with length option (length from 4 to 6).

Example

numcode(6);
Output should be '122856'

Contributors

Thanks goes to these wonderful people (emoji key):

Cuong Duy Nguyen
Cuong Duy Nguyen

💻 📖 ⚠️ 👀

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © 103cuong

Package Sidebar

Install

npm i numcode

Weekly Downloads

2

Version

0.2.1

License

MIT

Unpacked Size

5.06 kB

Total Files

5

Last publish

Collaborators

  • 103cuong