1.0.2 • Published 4 years ago
bulk-strings v1.0.2
bulk-strings
A simple random bulk string generator. Useful for testing/benchmarking applications.
Install
Install with npm:
$ npm install --save bulk-stringsUsage
Here are examples to generate 10 strings, 3-4 characters in length:
JavaScript
const bulkStrings = require('bulk-strings');
// generate 10 strings, 3-4 characters in length
bulkStrings({ total: 10, min: 3, max: 4 });CLI
$ bulk-strings --total 10 --min 3 --max 4Options
total- The total number of strings to generate (default: 100).min- The minimum length of each string (default: 1).max- The maximum length of each string (default: 10).format- The output format (default: array). Valid options are:array- JavaScript arraycsv- Delimited string (useful withseparatoroption)json- JSON formatted string
separator- Character(s) used to join the strings together (ifformatiscsv) (default: ,).file- A file path to write output to.