+18
-1
@@ -161,2 +161,19 @@ var assert = require('assert'); | ||
| function zero7(word) { | ||
| if (word.length === 6) | ||
| return '0' + word; | ||
| else if (word.length === 5) | ||
| return '00' + word; | ||
| else if (word.length === 4) | ||
| return '000' + word; | ||
| else if (word.length === 3) | ||
| return '0000' + word; | ||
| else if (word.length === 2) | ||
| return '00000' + word; | ||
| else if (word.length === 1) | ||
| return '000000' + word; | ||
| else | ||
| return word; | ||
| } | ||
| BN.prototype.toString = function toString(base) { | ||
@@ -183,3 +200,3 @@ base = base || 10; | ||
| if (c.cmp(0) !== 0) | ||
| out = zero6(r.words[0] + '') + out; | ||
| out = zero7(r.words[0] + '') + out; | ||
| else | ||
@@ -186,0 +203,0 @@ out = r.words[0] + out; |
+1
-1
| { | ||
| "name": "bn.js", | ||
| "version": "0.2.1", | ||
| "version": "0.2.2", | ||
| "description": "Big number implementation in pure javascript", | ||
@@ -5,0 +5,0 @@ "main": "lib/bn.js", |
+1
-0
@@ -21,2 +21,3 @@ var assert = require('assert'); | ||
| 'a89ce5af8724c0a23e0e0ff77500'); | ||
| assert.equal(bn('10654321').toString(), '10654321'); | ||
| }); | ||
@@ -23,0 +24,0 @@ |
-10
| var bn = require('./'); | ||
| var a1 = new bn('012345678901234567890123456789012345678901234567890', 10); | ||
| var b1 = new bn('7654213509123601923760129376102397651203958123402314875', 10); | ||
| var t = 0; | ||
| var x = b1.div(a1); | ||
| console.log(t); |
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
1050
1.06%32670
-99.53%6
-25%