{"_id":"binary-case","_rev":"9-4a5bb585bc5b8188075017f44ca20f21","name":"binary-case","description":"Take a string and a number and perform binary case switching on alpha characters.","dist-tags":{"latest":"1.1.4"},"versions":{"1.0.0":{"name":"binary-case","version":"1.0.0","description":"Take a string and a number and perform binary case switching on alpha characters.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/Gi60s/binary-case.git"},"keywords":["case","letter","alpha"],"author":{"name":"James Speirs"},"license":"Apache-2.0","bugs":{"url":"https://github.com/Gi60s/binary-case/issues"},"homepage":"https://github.com/Gi60s/binary-case#readme","devDependencies":{"tape":"^4.6.2"},"gitHead":"79888b2155ea009b37a8a91c0f30cc9b46e7bc33","_id":"binary-case@1.0.0","_shasum":"de68b495fca1c09913934c31ac7faf9861268617","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"gi60s","email":"james.speirs@gmail.com"},"dist":{"shasum":"de68b495fca1c09913934c31ac7faf9861268617","tarball":"https://registry.npmjs.org/binary-case/-/binary-case-1.0.0.tgz","integrity":"sha512-My43VvLiSY70+juegmC/Yqi2WFupPQQDOa23jeOCE8h2VUmBuCB9sj3PZge8LfTH9kf53ncUrkLvGLXKoI4+aA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICx3Zj/wqCNV+Wtq76YOLGuXj3paAH3fR0o93pCtK7FlAiBV5YFUAHSd2+1idulfxnd6uY1xjcCNgKfEG0BVSnUNCA=="}]},"maintainers":[{"name":"gi60s","email":"james.speirs@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/binary-case-1.0.0.tgz_1478630316381_0.2890779704321176"},"directories":{}},"1.1.0":{"name":"binary-case","version":"1.1.0","description":"Take a string and a number and perform binary case switching on alpha characters.","main":"index.js","scripts":{"test":"nyc tape test.js && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/Gi60s/binary-case.git"},"keywords":["case","letter","alpha"],"author":{"name":"James Speirs"},"license":"Apache-2.0","bugs":{"url":"https://github.com/Gi60s/binary-case/issues"},"homepage":"https://github.com/Gi60s/binary-case#readme","devDependencies":{"coveralls":"^2.11.14","nyc":"^8.4.0","tape":"^4.6.2"},"gitHead":"69cff10726ccec188c5701328f40d7ab4422da1a","_id":"binary-case@1.1.0","_shasum":"e58562962134262bb993868c9e0327cd37a2f6c3","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.0","_npmUser":{"name":"gi60s","email":"james.speirs@gmail.com"},"dist":{"shasum":"e58562962134262bb993868c9e0327cd37a2f6c3","tarball":"https://registry.npmjs.org/binary-case/-/binary-case-1.1.0.tgz","integrity":"sha512-hJzT2rqweT0ilFri/YeLqRzaN4rUxV52tI1QjMvGpsetu86dEEzxSxsa4Cnze3xKd7gc2rO28JnQBF0aCL8eEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxgAIF5Y4m63D8oEDFVGkzh9+QdXoKqv/cQ2twjLcuhAIgOMBxbpeStxjpIvwCZdXPfWpBTGnLBLSo3nRO8Wu2Vkg="}]},"maintainers":[{"name":"gi60s","email":"james.speirs@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/binary-case-1.1.0.tgz_1489437742609_0.20453489548526704"},"directories":{}},"1.1.1":{"name":"binary-case","version":"1.1.1","description":"Take a string and a number and perform binary case switching on alpha characters.","main":"index.js","scripts":{"test":"nyc tape test.js && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/Gi60s/binary-case.git"},"keywords":["case","letter","alpha"],"author":{"name":"James Speirs"},"license":"Apache-2.0","bugs":{"url":"https://github.com/Gi60s/binary-case/issues"},"homepage":"https://github.com/Gi60s/binary-case#readme","devDependencies":{"coveralls":"^2.11.14","nyc":"^8.4.0","tape":"^4.6.2"},"gitHead":"99bee9eb2e557b3c735c50faec55bfd03dae6088","_id":"binary-case@1.1.1","_shasum":"776c5a0ffcec066c3eb06327c5d505196ce38720","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"gi60s","email":"james.speirs@gmail.com"},"dist":{"shasum":"776c5a0ffcec066c3eb06327c5d505196ce38720","tarball":"https://registry.npmjs.org/binary-case/-/binary-case-1.1.1.tgz","integrity":"sha512-YvJOXu49BoJGIAWPmqTfoUxGkmlGLjX6VdzjCrmqFx75q5VKTYXegz0SVYVXwa8cyOchGro3+ucH1Y42+Vs3KQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHWBjRpC0OGMjie4ImN5HrBJ3QuYkjlGjpUs0QFx4DivAiApQrbsBxKho+tmFR7jwG+6YZmYfaHh6M0+QF4dgufOBw=="}]},"maintainers":[{"name":"gi60s","email":"james.speirs@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/binary-case-1.1.1.tgz_1489439010744_0.7414619941264391"},"directories":{}},"1.1.2":{"name":"binary-case","version":"1.1.2","description":"Take a string and a number and perform binary case switching on alpha characters.","main":"index.js","scripts":{"test":"nyc tape test.js && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/Gi60s/binary-case.git"},"keywords":["case","letter","alpha"],"author":{"name":"James Speirs"},"license":"Apache-2.0","bugs":{"url":"https://github.com/Gi60s/binary-case/issues"},"homepage":"https://github.com/Gi60s/binary-case#readme","devDependencies":{"coveralls":"^2.11.14","nyc":"^8.4.0","tape":"^4.6.2"},"gitHead":"ed8adb85dcec05bd37ec1c29f5182b2b29501fa6","_id":"binary-case@1.1.2","_shasum":"5898235df7ab9fb1738f285ca655b3121ddd60f8","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"gi60s","email":"james.speirs@gmail.com"},"dist":{"shasum":"5898235df7ab9fb1738f285ca655b3121ddd60f8","tarball":"https://registry.npmjs.org/binary-case/-/binary-case-1.1.2.tgz","integrity":"sha512-HfuloAC3gLRrFfOWW81kwDKl3boKQMb0rs/oZjKGnhCLmkall1MbsV0NxW7w7qm7qM2nPgF05WeZZrmL+5tIYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBicPLejHcZFpCIyRmcbBNHohot0TBa8xR1TLAXankTuAiEAlGUu7ONPfW/9HGX9UO5cDAPpoaGw3Sq2Jho3RjFOXC8="}]},"maintainers":[{"name":"gi60s","email":"james.speirs@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/binary-case-1.1.2.tgz_1489439354221_0.6161540444009006"},"directories":{}},"1.1.3":{"name":"binary-case","version":"1.1.3","description":"Take a string and a number and perform binary case switching on alpha characters.","main":"index.js","scripts":{"test":"nyc tape test.js && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/Gi60s/binary-case.git"},"keywords":["case","letter","alpha"],"author":{"name":"James Speirs"},"license":"Apache-2.0","bugs":{"url":"https://github.com/Gi60s/binary-case/issues"},"homepage":"https://github.com/Gi60s/binary-case#readme","devDependencies":{"coveralls":"^2.11.14","nyc":"^8.4.0","tape":"^4.6.2"},"gitHead":"ff37dadadba7373bc4fffe2f40ee353848441a37","_id":"binary-case@1.1.3","_shasum":"f91d0e3008f1fb0f4043d6594522d66d6d1c8409","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"gi60s","email":"james.speirs@gmail.com"},"dist":{"shasum":"f91d0e3008f1fb0f4043d6594522d66d6d1c8409","tarball":"https://registry.npmjs.org/binary-case/-/binary-case-1.1.3.tgz","integrity":"sha512-PaGkAmiyb17lPZ8J5A6WbtVg40xBx1N+yv3AWnvDsUvgptf9fElsJANutI/LqcTUgtEloIgG+4PZ1YwY9+ZHSQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+DJ2GArGs1rcD/t6tkYkRzL2XJdIflMm9BOAjx/QFwwIhAJoB+0wf1ryUAl30ZPUF4XYw/dwAYZdCchRhxZE+933e"}]},"maintainers":[{"name":"gi60s","email":"james.speirs@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/binary-case-1.1.3.tgz_1489440580356_0.49089555791579187"},"directories":{}},"1.1.4":{"name":"binary-case","version":"1.1.4","description":"Take a string and a number and perform binary case switching on alpha characters.","main":"index.js","scripts":{"test":"nyc tape test.js && nyc report --reporter=text-lcov | coveralls"},"repository":{"type":"git","url":"git+https://github.com/Gi60s/binary-case.git"},"keywords":["case","letter","alpha"],"author":{"name":"James Speirs"},"license":"Apache-2.0","bugs":{"url":"https://github.com/Gi60s/binary-case/issues"},"homepage":"https://github.com/Gi60s/binary-case#readme","devDependencies":{"coveralls":"^2.11.14","nyc":"^8.4.0","tape":"^4.6.2"},"gitHead":"a53af5c542b936d6c1329895dd9b93556024d132","_id":"binary-case@1.1.4","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"gi60s","email":"james.speirs@gmail.com"},"dist":{"integrity":"sha512-9Kq8m6NZTAgy05Ryuh7U3Qc4/ujLQU1AZ5vMw4cr3igTdi5itZC6kCNrRr2X8NzPiDn2oUIFTfa71DKMnue/Zg==","shasum":"d687104d59e38f2b9e658d3a58936963c59ab931","tarball":"https://registry.npmjs.org/binary-case/-/binary-case-1.1.4.tgz","fileCount":12,"unpackedSize":31471,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEX+H1aw27XLMLdOd7d9s53m+c0KcbGOv//6g1JcCDkaAiEAkcPA4MRIqPOMpKDcqLKAF8RbO3dXem2xYu6pe/TsX7M="}]},"maintainers":[{"name":"gi60s","email":"james.speirs@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/binary-case_1.1.4_1521834685457_0.29341927948667923"},"_hasShrinkwrap":false}},"readme":"[![NPM version](https://img.shields.io/npm/v/binary-case.svg?style=flat)](https://npmjs.org/package/binary-case)\n[![NPM downloads](https://img.shields.io/npm/dm/binary-case.svg?style=flat)](https://npmjs.org/package/binary-case)\n[![Build status](https://img.shields.io/travis/Gi60s/binary-case.svg?style=flat)](https://travis-ci.org/Gi60s/binary-case)\n[![Test coverage](https://img.shields.io/coveralls/Gi60s/binary-case.svg?style=flat)](https://coveralls.io/r/Gi60s/binary-case?branch=master)\n\n# binary-case\n\nTake a string and a number and perform binary case switching on alpha characters.\n\n## Example\n\n```js\nconst binaryCase = require('binary-case');\n\n// 3 in binary = 011\nconst number = 3;\n\n// 011 reversed to 110 so the first 2 characters will toggle case\nconst value = binaryCase('abc', 3);     // value: \"ABc\"\n```\n\n## Installation\n\n```sh\n$ npm install binary-case\n```\n\n## API\n\n### binaryCase ( string, number [, options ] ) : string | boolean\n\nTake a string and a number and perform binary case switching on alpha characters.\n\n**Parameters**\n\n- *string* - The string value to toggle alpha character cases on.\n\n- *number* - A number that will be converted to binary to determine case switching.\n\n- *options* - An optional object that defines options for the function.\n\n    - *allowOverflow* - Defaults to `true`. Set to `false` to have the `binaryCase` function return `false` when the number provided creates a binary string that is larger than the number of alpha characters in the string provided to be converted. Overflow will cause case switching sequences to repeat.\n\n        ```js\n        binaryCase('abc', 0);                               // 'abc'\n        binaryCase('abc', 8);                               // 'abc'\n        binaryCase('abc', 8, { allowOverflow: false });     // false\n        ```\n\n**Returns** a string if successful or `false` on failure.\n\n### binaryCase.iterator ( string [, options ] ) : object\n\nGet an iterator object that will allow iteration through all variations of the string's casing.\n\n**Parameters**\n\n- *string* - The string to produce case variations for.\n\n- *options* - An optional object that defines options for the iterator.\n\n    - *startIndex* - The number to start with for producing variations. This will reduce the total number of possible variations.\n\n**Returns** an object with a *next* property.\n\n**Example**\n\n```js\nconst iterator = binaryCase.iterator('abc');\niterator.next().value;  // 'abc'\niterator.next().value;  // 'Abc'\niterator.next().value;  // 'aBc'\niterator.next().value;  // 'ABc'\n```\n\n### binaryCase.maxNumber ( string ) : number\n\nDetermine the maximum number that can be used before causing repeating case variations.\n\n**Parameters**\n\n- *string* - The string value to count the number of possible case variations on.\n\n**Returns** a number.\n\nThis calculation is simple:\n\n1. Determine how many alpha characters exist in the string (a through z and A through Z)\n2. The result is 2 to the power of the number of alpha characters, minus 1.\n\nFor example: `abc` has 3 alpha characters. `2^3 - 1 = 7`\n\n### binaryCase.variations ( string ) : string[]\n\nGet an array of all possible case variations.\n\n**Parameters**\n\n- *string* - The string value to get case variations for.\n\n**Returns** an array of  strings.","maintainers":[{"name":"gi60s","email":"james.speirs@gmail.com"}],"time":{"modified":"2022-06-13T04:37:52.580Z","created":"2016-11-08T18:38:36.964Z","1.0.0":"2016-11-08T18:38:36.964Z","1.1.0":"2017-03-13T20:42:24.598Z","1.1.1":"2017-03-13T21:03:32.617Z","1.1.2":"2017-03-13T21:09:16.007Z","1.1.3":"2017-03-13T21:29:42.346Z","1.1.4":"2018-03-23T19:51:25.579Z"},"homepage":"https://github.com/Gi60s/binary-case#readme","keywords":["case","letter","alpha"],"repository":{"type":"git","url":"git+https://github.com/Gi60s/binary-case.git"},"author":{"name":"James Speirs"},"bugs":{"url":"https://github.com/Gi60s/binary-case/issues"},"license":"Apache-2.0","readmeFilename":"README.md"}