npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

double-conversion-decimal-binary

v1.1.0

Published

Double Conversion Decimal Binary [![Build Status](https://api.travis-ci.org/lucasBertola/double-conversion-decimal-binary.svg?branch=master)](https://travis-ci.org/lucasBertola/double-conversion-decimal-binary) ================== A simple but powerful l

Downloads

17

Readme

Double Conversion Decimal Binary Build Status

A simple but powerful libraire to convert decimals to binary and binary to decimal

##Usage

Require the module

var doubleConversion = require('double-conversion-decimal-binary');

uint8 to Array Binary

doubleConversion.uint8(5).toArrayBinary(); // [0,0,0,0,0,1,0,1]

uint8 to String Binary

doubleConversion.uint8(5).toStringBinary(); // "00000101"

Array Binary to uint8

doubleConversion.arrayBinary([0,0,0,0,0,1,0,1]).toUint8(); // 5

String Binary to uint8

doubleConversion.StringBinary("00000101").toUint8(); // 5

uint8, uint16, uint32, float32, float64

In above exemples, you can see how tu use uint8. But other type of number works in the same way!

doubleConversion.uint8(5).toArrayBinary();
doubleConversion.uint16(5).toArrayBinary();
doubleConversion.uint32(5).toArrayBinary();
doubleConversion.float32(5).toArrayBinary();
doubleConversion.float64(5).toArrayBinary();

doubleConversion.uint8(5).toStringBinary();
doubleConversion.uint16(5).toStringBinary();
doubleConversion.uint32(5).toStringBinary();
doubleConversion.float32(5).toStringBinary();
doubleConversion.float64(5).toStringBinary();

doubleConversion.arrayBinary([0,0,0,0,0,1,0,1]).toUint8();
doubleConversion.arrayBinary([0,0,0,0,0...lot of numbers..0,1,0,1]).toUint16();
doubleConversion.arrayBinary([0,0,0,0,0...lot of numbers..0,1,0,1]).toUint32();
doubleConversion.arrayBinary([0,0,0,0,0...lot of numbers..0,1,0,1]).toFloat32();
doubleConversion.arrayBinary([0,0,0,0,0...lot of numbers..0,1,0,1]).toFloat64();

doubleConversion.StringBinary("00000101").toUint8();
doubleConversion.StringBinary("000...lot of numbers...00101").toUint16();
doubleConversion.StringBinary("000...lot of numbers...00101").toUint32();
doubleConversion.StringBinary("000...lot of numbers...00101").toFloat32();
doubleConversion.StringBinary("000...lot of numbers...00101").toFloat64();

What is differences between uint8, uint16, uint32, float32 and float64 ?

http://my.math.wsu.edu/help/matlab/uint8.html

https://en.wikipedia.org/wiki/IEEE_754-1985

##Installation

You will can install Double Conversion Decimal Binary with npm:

npm install double-conversion-decimal-binary --save

##Contribute

Double Conversion Decimal Binary is an Open Source project that started in Lyon, French. Anybody in the world is welcome to contribute to the development of the project.

If you want to contribute feel free to send PR's, just make sure to run the gulp test task before submiting it. This way you'll run all the test specs .

<3