generate-coupon-code
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Generate coupon code

System Requirement

NodeJS: 14.x.x or above

Sample code

const CHARSET = {
  numbers: '0123456789',
  alphabetic: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
  alphanumeric: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
}

const codes: string[] = generate({
  bridget: '',
  timestamp: false,
  length: 9,
  batchSize: 3,
  count: 1e6,
  charset: CHARSET.alphanumeric,
  prefix: 'SAMPLE-PREFIX',
  postfix: 'SAMPLE-POSTFIX'
})

Readme

Keywords

none

Package Sidebar

Install

npm i generate-coupon-code

Weekly Downloads

2

Version

1.0.0

License

none

Unpacked Size

11.3 kB

Total Files

20

Last publish

Collaborators

  • vophitruonganh