javascript-petname
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

javascript-petname

Petname implementation in JavaScript, inspired by Dustin Kirkland's Petname. The data is from petname.

latest git version latest npm version license

Installation

Requirements

  • node >= v12
  • npm >= v5

javascript-petname can either be installed globally or used with npx.

npm install -g javascript-petname
npx javascript-petname

Usage

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-petname
npx 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.

License

MIT © anthonkendel

Package Sidebar

Install

npm i javascript-petname

Weekly Downloads

31

Version

1.2.0

License

MIT

Unpacked Size

1.09 MB

Total Files

22

Last publish

Collaborators

  • anthonkendel