Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 14, 2024 via pnpm

node-int64 0.3.3

Support for representing 64-bit integers in JavaScript
Package summary
Share
0
issues
1
license
1
MIT
Package created
30 Dec 2010
Version published
22 Dec 2014
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
node-int64@0.3.3
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of node-int64 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does node-int64 do?

Node-int64 is a popular npm package that provides support for representing 64-bit integers in JavaScript. In JavaScript, Numbers are generally represented as IEEE 754 double-precision floats, which unfortunately means they lose integer precision for values beyond +/- 2^53. This becomes a problem for projects that need to accurately handle 64-bit ints. Hence, a performant, Number-like class is needed, and Node-int64 fulfills that need. Vectoring as a support module for projects like node-thrift, Node-int64 provides a highly performant, Number-like class enabling accurate calculations and data representation.

How do you use node-int64?

In order to use Node-int64 in your JavaScript code, you need to install it through npm and then require it in your project file. Once it has been imported, you can create new instances of Int64. Here are some code examples to illustrate:

// Node-int64 is required in the project
var Int64 = require('node-int64')

// New Int64 instances can be created like this:
var x = new Int64(0x123456789)
var y = new Int64('123456789abcdef0')

// You can also create Int64s by passing hi/lo words, a Buffer, and a Buffer with an offset:
new Int64(0x12345678, 0x9abcdef0)
new Int64(new Buffer([0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0]))
new Int64(new Buffer([0,0,0,0,0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0]), 4)

These instances behave like JavaScript-native Numbers in many ways, and you can perform certain operations on them. Keep in mind, however, that Node-int64 is suited for carrying around int64 values, not for doing 64-bit integer arithmetic.

Where are the node-int64 docs?

Detailed documentation for Node-int64 can be found in the README file at the project's GitHub page. This file contains comprehensive information about the package's functionality and gives concrete examples of its utilization in JavaScript.