New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

int64-native

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

int64-native - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

5

int64.js

@@ -1,4 +0,3 @@

var path = require('path');
var nativeModule = require('bindings')('Int64.node');
var modulePath = path.join(__dirname, 'build', 'Release', 'Int64');
module.exports = require(modulePath).Int64;
module.exports = nativeModule.Int64;

8

package.json
{
"name": "int64-native",
"version": "0.3.2",
"version": "0.4.0",
"description": "A simple uint64_t wrapper for JavaScript",

@@ -26,3 +26,7 @@ "keywords": [

"license": "MIT",
"readmeFilename": "README.md"
"readmeFilename": "README.md",
"dependencies": {
"bindings": "1.2.x",
"nan": "^2.0.8"
}
}

@@ -111,2 +111,16 @@ var Int64 = require('../int64'),

});
it('can be extended via prototype', function testExtendPrototype() {
Int64.prototype.multiply = function(other) {
// NOTE: this will suffer from the same integer truncation issues that
// you get normally when manipulating JavaScript numbers.
var a = this.toNumber(),
b = other.toNumber();
return new Int64(a * b);
};
var a = new Int64(2),
b = new Int64(3),
c = new Int64(6);
expect(a.multiply(b).equals(c)).to.be.true;
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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