1.2.0 • Published 4 years ago
javascript-petname v1.2.0
javascript-petname
Petname implementation in JavaScript, inspired by Dustin Kirkland's Petname. The data is from petname.
Installation
Requirements
node>= v12npm>= v5
javascript-petname can either be installed globally or used with npx.
npm install -g javascript-petnamenpx javascript-petnameUsage
npx javascript-petname <args>The following arguments are available
| argument | description |
|---|---|
--words, -w | number of words, defaults to 2. |
--separator, -s | separator, defaults to - |
All arguments is available in the exported generatePetname() function.
Example
npx javascript-petnamenpx javascript-petname -w 4 -s =const { generatePetname } = require('javascript-petname');
generatePetname();const { generatePetname } = require('javascript-petname');
generatePetname({
words: 4,
separator: '=',
});Contributing
If you want to contribute and make our project better, your help is very welcome.