sd-generator

Generate Random String, Number and other pattern

Usage no npm install needed!

<script type="module">
  import sdGenerator from 'https://cdn.skypack.dev/sd-generator';
</script>

README

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