I want to generate 100 unique 10-char strings using chance.js. I use the code below, but it returns an error. Anyone knows how to make it work?
let res = chance.unique(chance.string({ length: 10, casing: 'upper', alpha: true, numeric: true }), 100);
<script src="https://cdnjs.cloudflare.com/ajax/libs/chance/1.1.6/chance.min.js"></script>
The following works, but it doesn't returns fixed-length strings.
let res = chance.unique(chance.string, 100);
console.log(res);
<script src="https://cdnjs.cloudflare.com/ajax/libs/chance/1.1.6/chance.min.js"></script>