{"_id":"@codenamize/codenamize","_rev":"1-4946d1121f1afce021875dcf9a4c1f11","name":"@codenamize/codenamize","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.1":{"name":"@codenamize/codenamize","version":"1.1.1","description":"Generate consistent easier-to-remember codenames from strings, numbers, or other seed inputs.","keywords":["alias","aliases","anonymise","anonymize","code","codename","codenamise","codenamize","generator","secret"],"main":"index.js","homepage":"https://github.com/stemail23/codenamize-js","repository":{"type":"git","url":"https://github.com/stemail23/codenamize-js"},"contributors":[{"name":"Steven Barlow","url":"https://github.com/stemail23"},{"name":"Sasha Case","url":"https://github.com/atcase"},{"name":"Riaan McLean","url":"https://github.com/rffsgate"}],"license":"MIT","private":false,"dependencies":{"big-integer":"^1.6.36","underscore":"^1.9.1"},"_id":"@codenamize/codenamize@1.1.1","dist":{"shasum":"adbe0888046d2552d7311e4aa3d236cdd23cbca4","tarball":"https://registry.npmjs.org/@codenamize/codenamize/-/codenamize-1.1.1.tgz","integrity":"sha512-ybCigE+ikx9Xm3R5di+7hQuZhA6FYWMv94FrX1Q/nKbESa8AR6Glr0GymzdmMChdKj4kuYaZJ7MCwi99CTnE5Q==","fileCount":12,"unpackedSize":40641,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb2ZBFCRA9TVsSAnZWagAAtU8P/RzdMLVhPaN4/uZVScZh\nPV1ZxsNhHnewrNJBJt28pUv4nYuO0nZ4IPJoAh/WUU+qEBtJMObASMgdfNDF\nXhRI3GsicOovvnLFag5CFUV5ue91eIMbaKChqvpkk18FDKN1xD2kp7NqpVA8\nWAzVeR/5EQY9Dbttm+C/I0Ono8wH64JomZ49XJuakU9l+ndB7LngwIMXxtAB\nWpfBYaFJwEyb38phFsZ6qrf8vFy8ArYMw9gQKHVRolZernD4nruUz0IzDMtG\nc1qRvxOjPvye7VO6l2KKUXUWrYtZ9r5mQwR1CT3Wriiszc+zy0CR5nVATrOC\nqToTwHtTXDEfGaBewfT30p30r4L+o6kU2ocRmEECxOGwUuof9YObHxEGGCyt\noVJcNdfLKX3vU8bgsZjEsvIwTd8MYTunxB02eQ3c0RCTA3Vwj5BzQPkGAySD\n8Bm7nLU1uqXF+sbbQPzP4QfSZKfuRVUZyi1sc8cWOPAwe7lsiIQjepKe9Al9\n+LOLfVOUWEMACFDHIZo+Tg61Rc9VjYTL97X0q5r2uSSLH0SQpkgDbJo3qYNz\natiMtjxHBxcWPQsEOG65Re4yu6atRCZVq0H8lfxlGDL+CNXrbIUd/1hU74yh\nRMfvmNhoYaDb3PTzpDmbi88X0DbSrZgotIfSk+cwBZ4Nw/PLKPqAwgEgmCIP\n1LaE\r\n=4W2N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAO/OmIUDgyF5UJYRZK0AuHj4PEqD+gr35adWtBIK0jQAiEAmjGD5Ys0+BgATwhlWlqYU5viguzw0txPCqHBNaAwDUA="}]},"maintainers":[{"name":"stemail23","email":"stemail23@gmail.com"}],"_npmUser":{"name":"stemail23","email":"stemail23@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/codenamize_1.1.1_1540984901275_0.4578224718580006"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-31T11:21:41.103Z","1.1.1":"2018-10-31T11:21:41.418Z","modified":"2022-04-05T00:04:11.892Z"},"maintainers":[{"name":"stemail23","email":"stemail23@gmail.com"}],"description":"Generate consistent easier-to-remember codenames from strings, numbers, or other seed inputs.","homepage":"https://github.com/stemail23/codenamize-js","keywords":["alias","aliases","anonymise","anonymize","code","codename","codenamise","codenamize","generator","secret"],"repository":{"type":"git","url":"https://github.com/stemail23/codenamize-js"},"contributors":[{"name":"Steven Barlow","url":"https://github.com/stemail23"},{"name":"Sasha Case","url":"https://github.com/atcase"},{"name":"Riaan McLean","url":"https://github.com/rffsgate"}],"license":"MIT","readme":"# Codenamize\n\n**Generate consistent easier-to-remember codenames from strings, numbers, or other seed inputs.**\n\n# Overview\n\n**Codenamize** is a JavaScript library for generating deterministic, alternative codenames for a given seed input. Using codenames in place of awkward identifiers, such as UUIDs, hashes, network addresses etc, helps human users to recall and quickly identify strings.\n\nThis is a JavaScript port of the original Python [codenamize](https://github.com/jjmontesl/codenamize) library, with extra extended capability!\n\n# Installation\n\nInstall from the [npm repository](https://www.npmjs.com/package/@codenamize/codenamize).\n\nWith [yarn](https://yarnpkg.com)…\n\n```shell\n$ yarn add @codenamize/codenamize\n```\n\n… or with [npm](https://www.npmjs.com).\n\n```shell\n$ npm install @codenamize/codenamize\n```\n\n# Usage\n\n## Importing\n\n```javascript\nconst codenamize = require('@codenamize/codenamize');\n```\n\n## Generating codenames\n\n### seed value\n\nOutput is deterministically based on the input seed. Numbers are converted to the equivalent string value.\n\nThe codenamize argument can be either a simple string or integer argument…\n\n```javascript\ncodenamize(1);\n// 'familiar-grand'\n\ncodenamize('1');\n// 'familiar-grand'\n\ncodenamize('11:22:33:44:55:66');\n// 'craven-delivery'\n```\n\n… or an `options` object argument.\n\n```javascript\ncodenamize({ seed: '1' });\n// 'familiar-grand'\n\ncodenamize({ seed: '11:22:33:44:55:66' });\n// 'craven-delivery'\n```\n\n### classic mode\n\nClassic mode uses `options.adjectiveCount` to determine the composition of the codename output, which will be made up of the specified number of adjectives, followed by a noun. Note that prepending more adjectives retains the existing codename words.\n\n```javascript\ncodenamize({ seed: '11:22:33:44:55:66', adjectiveCount: 2 });\n// 'separate-craven-delivery'\n\ncodenamize({ seed: '11:22:33:44:55:66', adjectiveCount: 3 });\n// 'unsuitable-separate-craven-delivery'\n```\n\n### particles mode\n\nInstead of `options.adjectiveCount`, the `options.particles` argument can alternatively be used to specify a more precise composition for the produced codename. The argument is an array of word categories which will be appended together to produce the output codename.\n\n```javascript\n> codenamize({ seed: '11:22:33:44:55:66', particles: ['adjective', 'noun'] });\n'craven-delivery'\n\ncodenamize({ seed: '11:22:33:44:55:66', particles: ['noun', 'adjective', 'noun'] });\n// 'satisfaction-craven-delivery'\n```\n\n### other options\n\nThese options can be used in either classic, or particles mode.\n\n`options.maxItemChars` specifies the maximum length of each codename word.\n\n```javascript\ncodenamize({ seed: '11:22:33:44:55:66', adjectiveCount: 2, maxItemChars: 3 });\n// 'hot-shy-age'\n\ncodenamize({ seed: '11:22:33:44:55:66', adjectiveCount: 2, maxItemChars: 4 });\n// 'even-cute-face'\n```\n\n`options.capitalize` determines whether each word in the codename will be capitalized.\n\n```javascript\ncodenamize({ seed: '11:22:33:44:55:66', capitalize: true });\n// 'Craven-Delivery'\n```\n\n`options.separator` specifies the character(s) used to combine the parts of the codename.\n\n```javascript\ncodenamize({ seed: '11:22:33:44:55:66', separator: ':' });\n// 'craven:delivery'\n```\n\n## Extending the codename vocabulary\n\nStraight out of the box, **Codenamize** emulates the behaviour of the original [Python library](https://github.com/jjmontesl/codenamize), and contains the same noun and adjective lists. Generated codenames with either library should be identical for a given  input.\n\n**Codenamize** can be extended with extra word lists with the `use` function. The `use` function takes a single object argument with keys representing each category of word, and values being arrays of words corresponding to the category.\n\n```javascript\ncodenamize.use({ color: [ 'red', 'green', 'blue' ], animal: [ 'pig', 'dog', 'cat' ] });\n\ncodenamize({ seed: '11:22:33:44:55:66', particles: ['color', 'animal'] });\n// 'blue-pig'\n```\n\nNote that in a real situation, a much more extensive list of words would likely be provide for each catagory of word.\n\n# Other versions\n\n* [Codenamize](https://github.com/jjmontesl/codenamize) - Python (the original!)\n* [Concode](https://github.com/DannyBen/concode) - Ruby\n","readmeFilename":"README.md"}