0.0.0 • Published 4 years ago

0b v0.0.0

Weekly downloads
50
License
MIT
Repository
github
Last release
4 years ago

0b

A JavaScript binary number parser; accepts a string or a numeric value.

Node.js's support for ECMAScript 2015(ES6) binary literals(0b)

4.3.2 and above0.12.160.10.47 and below
SupportedSupported(with harmony flag)Unsupported

Features

  • Works well on both web browsers and Node.js
  • No dependency

Example

var Ob = require("0b")(true);
// If `notational` is true,
// NaN and infinite values are not allowed;
// otherwise, they are allowed.

console.log("0b11110011", Ob(11110011)); // 243