{"name":"human-id","version":"3.0.0","description":"Returns from a pool of 10m human-readable IDs","main":"dist/index.js","types":"dist/index.d.ts","jsnext:main":"src/index.ts","scripts":{"start":"tsc -w","build":"rm -rf ./dist && tsc","examples":"tsc && node ./dist/examples.js"},"repository":{"type":"git","url":"git+https://github.com/RienNeVaPlus/human-id.git"},"keywords":["human","readable","id","identifier"],"author":{"name":"RienNeVaPlus","email":"?@rienneva.plus"},"license":"MIT","bugs":{"url":"https://github.com/RienNeVaPlus/human-id/issues"},"homepage":"https://github.com/RienNeVaPlus/human-id#readme","devDependencies":{"typescript":"^4.4.4"},"gitHead":"d607f6c2f4410bf603ab50b138ed504718c4641f","_id":"human-id@3.0.0","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"integrity":"sha512-smROKWOQI3rjjR44o5m9Bk2ds5YVTxfeL/rmp28fwOQyNhfQH13KMZ/jUErceC2fBuiQeOrWenopUN8hsBGZtQ==","shasum":"018957533b9f19bedcc48fe77980874884f4b301","tarball":"http://registry-npm.ywwl.com/human-id/download/human-id-3.0.0.tgz","fileCount":14,"unpackedSize":398983,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2tw8CRA9TVsSAnZWagAAuAEP/3sEcJx/8D9XYBLWd50k\n9NvIcn9CJUvL2Cdyz42hxLGnmHFPOyC4WT6oBhBZ7qiZy3bcKAVwoUxravHd\nTHtDUHMbG1ncqnRP7OHXWTP0Sl81UTBzIzMcnbQDaPjW73SCYsSAL/GLPOdl\nG2aNGq/fjAvXF0e8tnyfm/tvwkXsmnPTg2iCYg3lgdEbcq7/zH2DsiXvGKVD\nT1pZ0RErnPrm98NCDAEckkKP9UqdM5OEl9mTRAld5JSICSvwPl6Ox0JsO6BS\nruwgtinMAWj9ubAPDmIrKoDAFsj/T2JtKEuhBx8n6efJeYEeRSi2Upq//5xn\ni8x3+C9J1sgTqmF7KH9eO0cBHJAUtfrUrcV86B9N/lfMwglUcIeeRFQCdoAA\nSXrQZRBAjbp+08h6KaFWRiSW5nd9Wl05OeEZPL7hQyzwchWKqd1wQZbnQyAZ\nn7Yfr50kPtQTFaiZCBjPjkp9NPrymng30qZgeFj11fQe26V5liVGEWtdkh8k\nZnLHSXFGtEq+VNXiF+o73qQyTQhm9P05oKo1R9Hyh38TsAdv1Dxp/NrUQwPO\nIqcG2G/XhXvSfumgr8jIjmwKNIFmKQKO0wFIIY1fdC2cI/r6vXuzkq1GGJzV\nhnWtzoBAvrGK1v6GSe0ehymC/FNb544FriInxDiAEBF9l7cOUJhZcJ7/X+kC\n8RVH\r\n=O9Ww\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDfSZDt1+of270CEgGN5HDr7e+JEhRRrxlY6+NwfAtKiAiEAus2Wx3XDrhcEkehaAEE3f54o/MkUDWvIw23zzbzhDDE="}],"size":117810,"noattachment":false,"key":"/human-id/-/human-id-3.0.0.tgz"},"_npmUser":{"name":"riennevaplus","email":"npm@rienneva.plus"},"directories":{},"maintainers":[{"name":"riennevaplus","email":"npm@rienneva.plus"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/human-id_3.0.0_1636782336724_0.31444341379119667"},"_hasShrinkwrap":false,"readme":"<h3 align=\"center\">💃🆔</h3>\r\n\r\n## Human-Readable Identifiers\r\n\r\n![Downloads](https://img.shields.io/npm/dm/human-id)\r\n![License](https://img.shields.io/npm/l/human-id)\r\n\r\n> Using words to identify datasets (instead of numbers) provides various advantages when humans are involved, ie increased distinction and rememberability.\r\n\r\nHuman-ID generates readable strings by chaining common short words of the english language in a semi-meaningful way.\r\nThe result is concatenated of `adjective + noun + verb` resulting in a [minimum](#extended-pool-size) pool size of **15 000 000** possible combinations.\r\n\r\n- **SFW**: no bad words; family friendly results\r\n- No dependencies\r\n\r\n## Examples\r\n\r\n- FortyGhostsTalk\r\n- CalmSnailsDream\r\n- TastyRocksSparkle\r\n- HealthyCowsSmile\r\n- AfraidWallsExist\r\n- StrangeCarsRush\r\n- TwoLizardsSing\r\n- HappyLionsJump\r\n\r\n## Install\r\n\r\nYarn\r\n```\r\nyarn add human-id\r\n```\r\n\r\nNPM\r\n```\r\nnpm install human-id\r\n```\r\n\r\n## Usage\r\n\r\n### Command line\r\n\r\n```sh\r\nnpx human-id\r\n# RareGeckosJam\r\n\r\nnpx human-id lowercase + 2x\r\n# rare+geckos+jam\r\n# healthy+cows+smile\r\n```\r\n\r\n### Programmatic\r\n\r\n```js\r\nimport {humanId, poolSize, minLength, maxLength} from 'human-id'\r\n\r\n// RareGeckosJam\r\nhumanId()\r\n\r\n// Rare~Geckos~Jam\r\n// alias for { separator: '~' }\r\nhumanId('~')\r\n\r\n// rare-geckos-jam\r\nhumanId({\r\n  separator: '-',\r\n  capitalize: false,\r\n})\r\n\r\npoolSize()  // 15,000,000\r\nminLength() //          8\r\nmaxLength() //         19\r\n```\r\n\r\n## Extended Pool Size\r\n\r\nFor most cases, the default pool size should be large enough. However, the options `adjectiveCount` and `addAdverb` can be utilized to increase the pool size for the price of the string length.\r\n\r\n```js\r\nconst options = {\r\n  adjectiveCount: 2,\r\n  addAdverb: true,\r\n  separator: '.'\r\n}\r\n\r\nhumanId(options)   // Ten.Wet.Files.Cheer.Lazily\r\npoolSize(options)  // 630,000,000\r\nminLength(options) //          20\r\nmaxLength(options) //          41\r\n```\r\n\r\n## Executable arguments\r\n\r\nUse the following arguments to modify the default options or print multiple results.\r\n\r\n| Argument                   | Effect                                            |\r\n| -------------------------- | ------------------------------------------------- |\r\n| `a`, `adverb`, `addAdverb` | Sets `option.addAdverb` to `true`                 |\r\n| `l`, `lower`, `lowercase`  | Sets `option.capitalize` to `false`               |\r\n| `space`                    | Sets `option.separator` to an empty space ` `     |\r\n| any number                 | Sets `option.adjectiveCount` to the given integer |\r\n| any single character       | Sets `option.separator` to the character          |\r\n| any number followed by `x` | Repeats the output `number` times                 | \r\n\r\n### Example\r\n\r\n```bash\r\nnpx human-id adverb lower 2 _ 3x\r\n# clever_shaggy_memes_sit_quietly\r\n# cuddly_spicy_boxes_wave_politely\r\n# sweet_fair_wombats_fetch_bravely\r\n```\r\n\r\n## API\r\n\r\n#### `humanId(options?: string | Option): string`\r\nGenerates a human ID. **Options** can be a `string` (separator), a `boolean` (capitalize) or an `Options` object of:\r\n- **separator** `string = ''` - Separates the words from each other\r\n- **capitalize** `boolean = true` - Whether to transform the first character of each word to upper case\r\n- **adjectiveCount** `number = 1` - How many adjectives to return\r\n- **addAdverb** `boolean = false` - Adds a fourth part to the id\r\n\r\n*This function is also available as the default export*\r\n\r\n#### `poolSize(options?: string | Option): number`\r\nReturns the number of possible combinations for a given set of options.\r\n\r\n#### `minLength(options?: Option): number`\r\nThe length of the shortest possible id for a given set of options.\r\n\r\n#### `maxLength(options?: Option): number`\r\nThe length of the longest possible id for a given set of options.\r\n\r\n#### `adjectives: string[]`\r\nList of possible values for the first part of the human id.\r\n\r\n#### `nouns: string[]`\r\nList of possible values for the second part of the human id.\r\n\r\n#### `verbs: string[]`\r\nList of possible values for the third part of the human id.\r\n\r\n#### `adverbs: string[]`\r\nList of possible values for the optional fourth part of the human id.\r\n\r\n\r\n<h6 align=\"center\">💃🆔</h6>\r\n\r\n","publish_time":1636782336851,"_cnpm_publish_time":1636782336851,"dist-tags":{"latest":"4.2.2"}}