{"_id":"human-id@4.2.2","bin":{"human-id":"dist/cli.js"},"bugs":{"url":"https://github.com/RienNeVaPlus/human-id/issues"},"dist":{"shasum":"f4fa80ca5090f079bca82643b81932681c8783ab","tarball":"http://registry-npm.ywwl.com/human-id/download/human-id-4.2.2.tgz","fileCount":16,"integrity":"sha512-Z+8unD6em/MJwyrkWQ2M3wygRGI1+MztbutiNwk1DCuEPXOZRWGjtcMPZYP1exY9iNZMhd7ZOSMQSo9WYtiQRw==","signatures":[{"sig":"MEQCIGsZK37bltnVADWGQXwXhSpERE2UonkOk1bYKaTw3tKxAiAgp7qdnCaDuglTDoJHamQsIBBZF8gNNS9oeRgreJ4ZLA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDLQ0L4yYmBY6R8+n+fJdGrERhfIuDbzXjTjQQgwaucCwIhANXqWxYbEbhEKrlsAh5Ba1fEZssgCP6E9ZMlS6+3r8Fq"}],"unpackedSize":48488,"size":14412,"noattachment":false,"key":"/human-id/-/human-id-4.2.2.tgz"},"main":"dist/index.js","name":"human-id","type":"module","types":"dist/index.d.ts","author":{"name":"RienNeVaPlus","email":"?@rienneva.plus"},"gitHead":"6b107e0d17b2998f18be58497a36d420cb6138c7","license":"MIT","scripts":{"dev":"tsc -w","build":"rm -rf ./dist && tsc","examples":"tsc && node ./dist/examples.js"},"version":"4.2.2","_npmUser":{"name":"riennevaplus","email":"npm@rienneva.plus"},"homepage":"https://github.com/RienNeVaPlus/human-id#readme","keywords":["human","readable","id","identifier"],"repository":{"url":"git+https://github.com/RienNeVaPlus/human-id.git","type":"git"},"_npmVersion":"10.9.0","description":"Returns from a pool of 15m human-readable IDs","directories":{},"maintainers":[{"name":"riennevaplus","email":"npm@rienneva.plus"}],"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^6.0.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/human-id_4.2.2_1791125286793_0.6344357803713525"},"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)](https://www.npmjs.com/human-id)\r\n[![License](https://img.shields.io/npm/l/human-id)](https://github.com/RienNeVaPlus/human-id/blob/master/LICENSE)\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)  // 60,000,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":1791125286889,"_cnpm_publish_time":1791125286889,"dist-tags":{"latest":"4.2.2"}}