number-parity

1.0.0 • Public • Published

number-parity

No. of bits of an integer determines parity of a number. If it is even, parity is 0, else it's 1.

Usage

Installation

  $ npm install number-parity

Example

  var parity = require('number-parity')
  console.log(parity(34)) // 0
  console.log(parity(42)) // 1

License

MIT

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i number-parity

      Weekly Downloads

      1

      Version

      1.0.0

      License

      MIT

      Last publish

      Collaborators

      • incessantmeraki