sd-generator

1.0.2 • Public • Published

Generate Random String, Number and other pattern

Install

$ npm install --save sd-generator

Usage

const generator = require("sd-generator")

console.log(generator.randomString(10,true)) // !HO=S.L^F&
console.log(generator.randomNumber(4)) // 6606
console.log(generator.randomCustom(6,'QWERTYUIOP')) // IWTEPY
console.log(generator.transactionCode()) // TRX-2021-03-11-5:44:41-4VIFC

SD-Generator Type Function

Below are special / custom functions to generate your string

function default description output
randomString(length,withSymbol) (4, false) generate your random string string
randomNumber(length) (4) generate your random number string
randomCustom(length,characters) (4, '') generate your custom string string
transactionCode(prefix,separator,utc,length) ('TRX', '-', 0 , 5) generate transaction code easily string

License

MIT © SDANALYZER

Package Sidebar

Install

npm i sd-generator

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

3.58 kB

Total Files

3

Last publish

Collaborators

  • sdanalyzer