compost

0.0.1 • Public • Published

Compost

Decompose and compose integers to and from lists of bits.

Overview

Need to know what bits are set in a number? Compost is here to help you out!

With Compost, you can decompose numbers into lists of bits and recompose them as easy as cake!

Usage

Also see the documentation and example.

var compost = require("./index");
 
// {0: true, 2: true}
console.log(compost.decompose(5));
 
// 5
console.log(compost.compose({0: true, 2: true}));

License

3-clause BSD. A copy is included with the source.

Contact

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    5

Package Sidebar

Install

npm i compost

Weekly Downloads

4

Version

0.0.1

License

BSD

Last publish

Collaborators

  • deoxxa