bn.js 5.1.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 5.1.1 / 2019-12-24
2
+ ------------------
3
+
4
+ - Temporary workaround for BN#_move (#236)
5
+ - Add eslintrc instead config in package.json (#237)
6
+
1
7
  5.1.0 / 2019-12-23
2
8
  ------------------
3
9
 
package/lib/bn.js CHANGED
@@ -327,11 +327,15 @@
327
327
  dest.red = this.red;
328
328
  };
329
329
 
330
+ function move (dest, src) {
331
+ dest.words = src.words;
332
+ dest.length = src.length;
333
+ dest.negative = src.negative;
334
+ dest.red = src.red;
335
+ }
336
+
330
337
  BN.prototype._move = function _move (dest) {
331
- dest.words = this.words;
332
- dest.length = this.length;
333
- dest.negative = this.negative;
334
- dest.red = this.red;
338
+ move(dest, this);
335
339
  };
336
340
 
337
341
  BN.prototype.clone = function clone () {
@@ -3243,7 +3247,7 @@
3243
3247
  Red.prototype.imod = function imod (a) {
3244
3248
  if (this.prime) return this.prime.ireduce(a)._forceRed(this);
3245
3249
 
3246
- a.umod(this.m)._forceRed(this)._move(a);
3250
+ move(a, a.umod(this.m)._forceRed(this));
3247
3251
  return a;
3248
3252
  };
3249
3253
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bn.js",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "Big number implementation in pure javascript",
5
5
  "main": "lib/bn.js",
6
6
  "scripts": {
@@ -38,14 +38,5 @@
38
38
  },
39
39
  "standardx": {
40
40
  "parser": "babel-eslint"
41
- },
42
- "eslintConfig": {
43
- "rules": {
44
- "semi": [
45
- 2,
46
- "always"
47
- ],
48
- "no-extra-semi": 2
49
- }
50
41
  }
51
42
  }