Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cuongndc9/numcode

6️⃣7️⃣ Generating codes is easy and simple.
https://github.com/cuongndc9/numcode

103cuong code number-code numcode otp-code

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# numcode

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

[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg)](#contributors)
[![Build Status](https://travis-ci.com/103cuong/numcode.svg?branch=master)](https://travis-ci.com/103cuong/numcode)
![npm](https://img.shields.io/npm/v/numcode.svg)
![david](https://img.shields.io/david/103cuong/numcode.svg)
[![Hits-of-Code](https://hitsofcode.com/github/103cuong/numcode)](https://hitsofcode.com/view/github/103cuong/numcode)
[![GitHub](https://img.shields.io/github/license/103cuong/numcode.svg)](https://github.com/103cuong/numcode/blob/master/LICENSE)

## Installation

```sh
yarn add numcode
# or
npm install -s numcode
```

## Usage

**For ES6 or ESNext**

```javascript
import { numcode } from 'numcode';
```

**For CommonJS**

```javascript
const { numcode } = require('numcode');
```

```javascript
console.log(numcode());
```

```sh
Output should be '1998'
```

## API

### `numcode(length)`

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

**Example**

```javascript
numcode(6);
```

```sh
Output should be '122856'
```

## Contributors

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Cuong Duy Nguyen
Cuong Duy Nguyen

💻 📖 ⚠️ 👀

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

## License

MIT © [103cuong](https://github.com/103cuong)