Socket
Book a DemoInstallSign in
Socket

compost

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

compost

Decompose and compose integers to and from lists of bits

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

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

Keywords

integer

FAQs

Package last updated on 18 Sep 2012

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