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

Readme

Keywords

Package Sidebar

Install

npm i to-unsigned-int32

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • ichetandhembre