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

binarifyit

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binarifyit

Transform integer into specified size binary

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

binarify

Transform an integer into its binary form with the desire number of bits.

Install

npm i binarifyit

Usage

The function receives two arguments: number and bits. The former is the number you want to transform while the latter is the number of bits you want.

If the bits parameter is not specified, the transform will return the default number of bits.

const binarifyit = require('binaryfyit')

console.log(binarifyit(5)) // 101
console.log(binarifyit(5,6)) // 000101

Licence

MIT

Keywords

binary

FAQs

Package last updated on 05 Jul 2019

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