New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

not-binary

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

not-binary

Returns true, if not a binary number or string

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

not-binary

Returns true, if not a binary number (string).

npm License

Installation

Install via npm

npm i not-binary

Install via yarn

yarn add not-binary

Usage

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)

Keywords

binary

FAQs

Package last updated on 04 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts