Skip to content

kdkchy/random-string-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

string-random-generator

desc

we can create a random string with this package. Built with simple javascript function Math.floor(Math.random() ...) and you can random all things, like alphabet, number, and symbol. You can also give a parameter that will random by this package!

installation

npm i string-random-generator

import

const randomString = require('string-random-generator')

you also can import only one function in it

const { doNumber } = require('string-random-generator)

time to play

console.log(randomString.allRandom(5)) // will print 5 random string : {)FVN

what can you do

function parameter example result
allRandom (int) randomString.allRandom(5) 1pO[. // generated 5 char
doNumber (int) doNumber(5) 41802
doUpper (int) doUpper(5) JSOPQ
doLower (int) doLower(5) dqmfi
doSym (int) doSym(5) (@:!0
customInput (int, string) ...(5, 'qwerty') ttweq
customRandom (int, object) ...(5, { upperc: true, lowerc: true, num: true, sym: false }) wR5r2

About

generate a random string, by alphabetic, and or numeric, that can also determine the length of it

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published