npm.io
1.1.0 • Published 11 years ago

to-unsigned-int32

Licence
MIT
Version
1.1.0
Deps
1
Vulns
0
Weekly
0

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

Keywords