awaresol-use-randomiser
v1.0.0
Published
A React hook to generate random strings with specific criteria.
Downloads
2
Readme
awaresol-use-randomiser
A React hook to generate random strings with specific criteria.
Installation
npm install awaresol-use-randomiser
USAGE
import useRandomiser, { useTrigger } from 'use-randomiser';
const [trigger, generate] = useTrigger();
const password = useRandomiser({ returnType: 'string', requestedlength: 12, trigger: generate });
console.log(password); // Outputs a random string of length 12 with at least one lowercase letter, one uppercase letter, one number, and one special character