Take a string and a number and perform binary case switching on alpha characters.
Example
const binaryCase = require('binary-case');// 3 in binary = 011const number = 3;// 011 reversed to 110 so the first 2 characters will toggle caseconst value = binaryCase('abc', 3); // value: "ABc"
Take a string and a number and perform binary case switching on alpha characters.
Parameters
string - The string value to toggle alpha character cases on.
number - A number that will be converted to binary to determine case switching.
options - An optional object that defines options for the function.
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.