# order-no

> A module to generate an order number in any length.

Latest version **1.0.3** (published 2016-03-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install order-no
pnpm add order-no
yarn add order-no
bun add order-no
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-03-23 |
| First published | 2016-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kun Ran |
| Maintainers | rankun203 |
| Keywords | order, number, youdar, c2c, e-commerce, random, pad |

## Links

- npm: https://www.npmjs.com/package/order-no
- Repository: https://github.com/rankun203/order-no
- Homepage: https://github.com/rankun203/order-no#readme
- Issues: https://github.com/rankun203/order-no/issues
- npm.io page: https://npm.io/package/order-no

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2016-03-23
- 1.0.2 — 2016-03-23
- 1.0.1 — 2016-03-23
- 1.0.0 — 2016-03-23

## README

# order-no
Node.js, module to generate an order number in any length.

Generate your "unique" Order No:

```javascript
// Final length = uidLength + oidLength + randomLength;

const no = orderNo.makeOrderNo(1, 5);

console.log('              ' + no);

// Then prefix with your date or something you like the best to an Order NO:
const now   = new Date(),
      theNo = (now.toISOString().replace(/[-T:Z\.]/g, '').substr(0, 14)).toString() + no;

console.log(theNo);
```

The output:

```
              1980852598
201603230733541980852598
1,000,000 orderNos generated in: 489 ms
```

---
_Source: https://npm.io/package/order-no · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
