uni-order-no

1.0.7 • Public • Published

uni-order-no

Generates a string which consists of date and a string generated by generate-password. You can use in order no or somewhere need unique string.

Install

npm install uni-order-no --save

Usage

 
const orderNoGenerator = require('uni-order-no').generate;
 
// Default will generates string which consists date time string and 6 lower case letters.
console.log(orderNoGenerator());
// Result: 20160929115608gvrjqy
 
 
// You can assign letter's length.
// For example: I assign length = 10, so I can get a string consists date time string and 10 lower case letters.
console.log(orderNoGenerator({
  length: 10,
}));
// Result: 20160929115608ofbdrltopi

Readme

Keywords

none

Package Sidebar

Install

npm i uni-order-no

Weekly Downloads

4

Version

1.0.7

License

ISC

Last publish

Collaborators

  • jacky810124