not-binary
v1.0.0
Published
Returns true, if not a binary number or string
Downloads
2
Maintainers
Readme
not-binary
Returns true, if not a binary number (string).
Installation
Install via npm
npm i not-binaryInstall via yarn
yarn add not-binaryUsage
const notBinary = require("not-binary");
console.log(notBinary("101010")); // false (binary)
console.log(notBinary("hello123")); // true (not binary)
console.log(notBinary("123abc")); // true (not binary)
console.log(notBinary("0101012")); // true (not binary)
console.log(notBinary("")); // true (empty string is not binary)
console.log(notBinary("0000")); // false (binary)