Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

from-unsigned-int32

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

from-unsigned-int32

convert 32 bit buffer to integer

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

js-standard-style

convert 32 bit buffer (size 4 byte) to number (base 10).

Currently only support big endian.

Also checkout to-unsigned-int32

Install

npm i from-unsigned-int32

API

  1. Async API
var fromUInt32 = require('from-unsigned-int32')

fromUInt32(buffr /*<Buffer 00 20 00 00 00 00 00 0c>*/, 4, function (err, res) {
	console.log(res) //12
})

buffr should be Buffer.

offset this is optional parameter default is 0.

callback get two arguments:

  1. An error object.

  2. number (base 10).

  3. Sync API

var fromUInt32 = require('from-unsigned-int32')

console.log(fromUInt32.fromUInt32Sync(buffr /*<Buffer 00 20 00 00 00 00 00 0c>*/), 4)  //12

buffr should be Buffer.

offset this is optional parameter default is 0.

returns integer

licence

MIT

Keywords

FAQs

Package last updated on 16 Jul 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc