Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

to-unsigned-int32

1.1.0 • Public • Published

js-standard-style

convert number to 32 bit buffer (size 8 byte).

Currently only support big endian.

also checkout from-unsigned-int32.

Install

npm i to-unsigned-int32

Usage

var toUInt32 = require('to-unsigned-int32')
 
toUInt32(12, function (err, res) {
    console.log(res) //<Buffer 00 00 00 0c>
})
 

Module only support async api.

n can be number in any base.

callback get two arguments:

  1. An error object.

  2. Buffer with length of 4.

licence

=== MIT

install

npm i to-unsigned-int32

Downloadsweekly downloads

5

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar