{"_id":"asana-phrase","_rev":"6-b59d9f2416c048cb72c3e88569d32f29","name":"asana-phrase","description":"Random error phrase generator used by Asana","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.1":{"name":"asana-phrase","version":"0.0.1","description":"Random error phrase generator used by Asana","main":"index.js","scripts":{"test":"gulp test"},"repository":{"type":"git","url":"git://github.com/Asana/node-asana-phrase.git"},"keywords":["asana","error","phrase","random"],"author":{"name":"Greg Slovacek"},"license":"MIT","bugs":{"url":"https://github.com/Asana/node-asana-phrase/issues"},"homepage":"https://github.com/Asana/node-asana-phrase","devDependencies":{"browserify":"^11.0.1","gulp":"^3.9.0","gulp-bump":"^0.3.1","gulp-filter":"^3.0.0","gulp-git":"^1.2.4","gulp-istanbul":"^0.10.0","gulp-jshint":"^1.11.2","gulp-mocha":"^2.1.3","gulp-tag-version":"^1.3.0","gulp-uglify":"^1.2.0","jshint-stylish":"^2.0.1","sinon":"^1.15.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"gitHead":"bd8b003234ff36cee6c7f7381b8e680fdd5374ea","_id":"asana-phrase@0.0.1","_shasum":"5dbbb7598f89692cec637fcc59bd6722c8d50fbb","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.10.33","_npmUser":{"name":"slobak","email":"slobak@gmail.com"},"maintainers":[{"name":"slobak","email":"slobak@gmail.com"}],"dist":{"shasum":"5dbbb7598f89692cec637fcc59bd6722c8d50fbb","tarball":"https://registry.npmjs.org/asana-phrase/-/asana-phrase-0.0.1.tgz","integrity":"sha512-bTebGBsxirknv2c7EkvjBpcKVPJPRUr7FysmHVRnI7OwsX+KhUY0R9I586FAl8ypFh1YnBHqGXIGCQ4FEsI1aA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDBi4cO/KutJA3YHPRQLHvrSmsClpqrZAyA/Jr23KA9UAiEAnMzDw0b20MGTXiPjZOVyBXWnszAlAbbTL5bCNVBJugk="}]}},"0.0.2":{"name":"asana-phrase","version":"0.0.2","description":"Random error phrase generator used by Asana","main":"index.js","scripts":{"test":"gulp test"},"repository":{"type":"git","url":"git://github.com/Asana/node-asana-phrase.git"},"keywords":["asana","error","phrase","random"],"author":{"name":"Greg Slovacek"},"license":"MIT","bugs":{"url":"https://github.com/Asana/node-asana-phrase/issues"},"homepage":"https://github.com/Asana/node-asana-phrase","devDependencies":{"browserify":"^11.0.1","gulp":"^3.9.0","gulp-bump":"^0.3.1","gulp-filter":"^3.0.0","gulp-git":"^1.2.4","gulp-istanbul":"^0.10.0","gulp-jshint":"^1.11.2","gulp-mocha":"^2.1.3","gulp-tag-version":"^1.3.0","gulp-uglify":"^1.2.0","jshint-stylish":"^2.0.1","sinon":"^1.15.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"gitHead":"3eeee5641a4a9e8f0e4212cac9964d1a708f632f","_id":"asana-phrase@0.0.2","_shasum":"cabaf11bb23f204c9c8f92085d5400b91e09bf27","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.10.33","_npmUser":{"name":"slobak","email":"slobak@gmail.com"},"maintainers":[{"name":"slobak","email":"slobak@gmail.com"}],"dist":{"shasum":"cabaf11bb23f204c9c8f92085d5400b91e09bf27","tarball":"https://registry.npmjs.org/asana-phrase/-/asana-phrase-0.0.2.tgz","integrity":"sha512-LwMrjC2SzzWb+Jfx4RaJs0hPatL8abbj++PYfL0/AUrwUJ6NRQMomH+reGivH9kG+hCXWZoiZ2e/ihunZ68ydg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEf5wjYuA7lqjfISMPxR40IUu57kLwjVzy2oB9UKbJvQIhAJRfNl/KK6DCQ2z4yCuPiD3f0Pfo+Om6nnFuFsIaXf9F"}]}},"0.0.7":{"name":"asana-phrase","version":"0.0.7","description":"Random error phrase generator used by Asana","main":"index.js","scripts":{"test":"gulp test"},"repository":{"type":"git","url":"git://github.com/Asana/node-asana-phrase.git"},"keywords":["asana","error","phrase","random"],"author":{"name":"Greg Slovacek"},"license":"MIT","bugs":{"url":"https://github.com/Asana/node-asana-phrase/issues"},"homepage":"https://github.com/Asana/node-asana-phrase","devDependencies":{"browserify":"^11.0.1","gulp":"^3.9.0","gulp-bump":"^0.3.1","gulp-filter":"^3.0.0","gulp-git":"^1.2.4","gulp-istanbul":"^0.10.0","gulp-jshint":"^1.11.2","gulp-mocha":"^2.1.3","gulp-tag-version":"^1.3.0","gulp-uglify":"^1.2.0","jshint-stylish":"^2.0.1","sinon":"^1.15.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"gitHead":"ae8ba07ab32df95ee480aae0ef21d8e2de74ff80","_id":"asana-phrase@0.0.7","_shasum":"5cc22392b21bf689890bba0a733beb3bdef969b2","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.10.33","_npmUser":{"name":"slobak","email":"slobak@gmail.com"},"dist":{"shasum":"5cc22392b21bf689890bba0a733beb3bdef969b2","tarball":"https://registry.npmjs.org/asana-phrase/-/asana-phrase-0.0.7.tgz","integrity":"sha512-3uLfAt2at6Jk9cYHzqSCnt0qBJ65oDX5umrPXQ2iXgl1e59JndnrIFFcN43UXCwSo9lhTUI0uH/ZU/tFaMVg7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5qotmI3eQgzejVcic9NIokRovKI0WoAaPiYV92JyHZQIgeLzX96bZfPML1Ijef8VpOWqSCSUyrYcyKNWhbWQ3J+c="}]},"maintainers":[{"name":"slobak","email":"slobak@gmail.com"}]},"0.0.8":{"name":"asana-phrase","version":"0.0.8","description":"Random error phrase generator used by Asana","main":"index.js","scripts":{"test":"gulp test"},"repository":{"type":"git","url":"git://github.com/Asana/node-asana-phrase.git"},"keywords":["asana","error","phrase","random"],"author":{"name":"Greg Slovacek"},"license":"MIT","bugs":{"url":"https://github.com/Asana/node-asana-phrase/issues"},"homepage":"https://github.com/Asana/node-asana-phrase","devDependencies":{"browserify":"^11.0.1","gulp":"^3.9.0","gulp-bump":"^0.3.1","gulp-filter":"^3.0.0","gulp-git":"^1.2.4","gulp-istanbul":"^0.10.0","gulp-jshint":"^1.11.2","gulp-mocha":"^2.1.3","gulp-tag-version":"^1.3.0","gulp-uglify":"^1.2.0","jshint-stylish":"^2.0.1","sinon":"^1.15.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"gitHead":"cf3f1341e9036976777379a773478eb286e0785f","_id":"asana-phrase@0.0.8","_shasum":"16217ffd443a31a33ba8c0726a0d235558f475d9","_from":".","_npmVersion":"2.12.1","_nodeVersion":"0.10.33","_npmUser":{"name":"slobak","email":"slobak@gmail.com"},"dist":{"shasum":"16217ffd443a31a33ba8c0726a0d235558f475d9","tarball":"https://registry.npmjs.org/asana-phrase/-/asana-phrase-0.0.8.tgz","integrity":"sha512-+3/fzZjKpZY1Mxvdmi9++BsUKtRWcVYi6Db6JMTA97mofI6sXDepbXlUuqsBF6wodVBpIp9BAuJrUtc3fkkbag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFLCYyTuKZ3p4+b7x4blwN6KdmygMtAM0puwi+VmBGdBAiEArddugZyjb2nhOZzDcZGDLBY/asYUs6VU3drnpnOMkeM="}]},"maintainers":[{"name":"slobak","email":"slobak@gmail.com"}]}},"readme":"# Asana Error Phrase Factory [![GitHub release][release-image]]() [![Build Status][travis-image]][travis-url] [![NPM Version][npm-image]][npm-url]\n\nA random phrase generator used to create memorable error codes, as used by Asana.\n\n## Installation\n\n### Node\n\nInstall with npm:\n\n```sh\nnpm install asana-phrase --save\n```\n\n### Browser\n\nInclude the latest release directly from GitHub.\n\n```html\n<script src=\"https://github.com/Asana/node-asana-phrase/releases/download/<LATEST_RELEASE>/asana-phrase-min.js\"></script>\n```\n\nOR\n\n1. Download the latest distribution in [releases](https://github.com/Asana/node-asana-phrase/releases).\n2. Make sure to serve it from your webserver.\n3. Include it on the client from a `SCRIPT` tag.\n\n## Overview\n\nThis package is designed to convert large numbers (like IDs) into human-readable phrases,\nwhich are more entertaining and memorable, and suitable for error codes.\n\nThe package can support conversion of numbers of arbitrary length if represented as a hex string, as well as integers up to 53 bits. The default phrase factory provided converts 32-bit numbers, but custom ones can be created to work with larger bit sizes.\n\nIt operates on a simple bitwise substitution principle, so given a particular\nphrase factory, there is a deterministic way to map any set of bits into a\nphrase and vice versa.\n\n## Usage\n\nIf you just want 32-bit numbers translated to phrases in the same way Asana does,\nyou can use the default phrase factory.\n\n```js\nvar phrase = require('asana-phrase');\nphrase.default32BitFactory().randomPhrase();\n\n>>> [\"6\", \"sad\", \"squid\", \"snuggle\", \"softly\"]\n```\n\nIf you want to customize the generated phrases (or create ones with a larger\nbit space), you can very easily add your own word generators.\nThere are two predefined types of word generator: `Dictionary` and `NumberRange`,\nwhich you can plug into the `Factory` to make your own combinations. You can\nalso access the dictionaries that comprise the default phrase factory so you\ncan leverage it in your custom factory:\n\n```js\nvar factory = new phrase.Factory([\n  new phrase.Dictionary(phrase.dictionaries.subjects),\n  new phrase.Dictionary(phrase.dictionaries.verbs),\n  new phrase.Dictionary([\"with\", \"against\", \"for\", \"around\"]),\n  new phrase.Dictionary(phrase.dictionaries.subjects)\n]);\nfactory.randomPhrase();\n\n>>> [\"trout\", \"behave\", \"around\", \"sharks\"]\n```\n\nIf you want some logic that isn't based on making sequential numbers or\nchoosing words from a dictionary, it's very easy to make your own word generator.\nSimply subclass `WordGenerator` and fulfill its simple contract.\n\n[travis-url]: http://travis-ci.org/Asana/node-asana-phrase\n[travis-image]: http://img.shields.io/travis/Asana/node-asana-phrase.svg?style=flat-square\n\n[npm-url]: https://www.npmjs.org/package/asana-phrase\n[npm-image]: http://img.shields.io/npm/v/asana-phrase.svg?style=flat-square\n\n[release-image]: https://img.shields.io/github/release/asana/node-asana-phrase.svg\n","maintainers":[{"name":"slobak","email":"slobak@gmail.com"}],"time":{"modified":"2022-06-13T03:31:10.141Z","created":"2015-08-07T08:06:30.798Z","0.0.1":"2015-08-07T08:06:30.798Z","0.0.2":"2015-08-07T08:16:52.522Z","0.0.7":"2015-08-07T19:30:37.866Z","0.0.8":"2015-08-11T00:00:31.736Z"},"homepage":"https://github.com/Asana/node-asana-phrase","keywords":["asana","error","phrase","random"],"repository":{"type":"git","url":"git://github.com/Asana/node-asana-phrase.git"},"author":{"name":"Greg Slovacek"},"bugs":{"url":"https://github.com/Asana/node-asana-phrase/issues"},"license":"MIT","readmeFilename":"README.md"}