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

fast-bin

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-bin

Quickly Convert an Array of Numbers into their Minimal Binary Representations

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
530
-28.76%
Maintainers
1
Weekly downloads
 
Created
Source

fast-bin

Quickly Convert an Array of Numbers into their Minimal Binary Representations

install

npm install fast-bin

usage

binarize an array of numbers

const binarize = require('fast-bin/binarize');

const input = [0, 1, 2, 3, 4];
const { data: output, nbits } = binarize({ data: input });
// output is '000001010011100'
// nbits is 3

unbinarize a string

const unbinarize = require('fast-bin/unbinarize');

const data = '00011011';
const nbits = 2;
const arr = unbinarize({ data, nbits });
// arr is [0, 1, 2, 3]

support

Post an issue at https://github.com/danieljdufour/fast-bin

Keywords

binary

FAQs

Package last updated on 21 Sep 2020

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