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

num

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

num - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

test/mod.js

22

num.js

@@ -176,2 +176,24 @@ var int = require('int');

Num.mod = function(a, b) {
a = ensure_num(a);
b = ensure_num(b);
var prec_a = a._precision;
var prec_b = b._precision;
var a = a._int;
var b = b._int;
while (prec_a < prec_b) {
a = a.mul(10);
prec_a += 1;
}
while (prec_b < prec_a) {
b = b.mul(10);
prec_b += 1;
}
return Num(a.mod(b), prec_a);
};
/// returns < 0 if a < b, 0 if a == b, > 0 if a > b

@@ -178,0 +200,0 @@ Num.cmp = function(a, b) {

2

package.json

@@ -5,3 +5,3 @@ {

"description": "arbitrary precision integer and decimal library in pure javascript",
"version": "0.0.2",
"version": "0.1.0",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

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