Skip to content

Commit 27508d2

Browse files
committedDec 20, 2019
deps: update deps and fix formatting for standard@14
1 parent a431989 commit 27508d2

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed
 

‎index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ BigNum.prototype.toNumber = function () {
7474
return parseInt(this.toString(), 10)
7575
}
7676

77-
;[ 'add', 'sub', 'mul', 'div', 'mod' ].forEach(function (op) {
77+
;['add', 'sub', 'mul', 'div', 'mod'].forEach(function (op) {
7878
BigNum.prototype[op] = function (num) {
7979
var x
8080
if (BigNum.isBigNum(num)) {

‎package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
"url": "http://www.justmoon.net"
2323
},
2424
"dependencies": {
25-
"bindings": "~1.3.0",
25+
"bindings": "^1.5.0",
2626
"nan": "^2.14.0",
27-
"prebuild-install": "~4.0.0",
28-
"safe-buffer": "~5.1.2"
27+
"prebuild-install": "^5.3.3",
28+
"safe-buffer": "^5.2.0"
2929
},
3030
"devDependencies": {
31-
"prebuild": "~7.6.0",
32-
"prebuild-ci": "~2.2.3",
33-
"put": "~0.0.5",
34-
"standard": "~11.0.1",
35-
"tap": "~12.0.1"
31+
"prebuild": "^9.1.1",
32+
"prebuild-ci": "^3.1.0",
33+
"put": "0.0.6",
34+
"standard": "^14.3.1",
35+
"tap": "^14.10.5"
3636
},
3737
"scripts": {
3838
"install": "prebuild-install || node-gyp rebuild",

‎test/big.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ test('cmp', { timeout: 120000 }, function (t) {
241241
var bi = BigNum(i)
242242

243243
for (var j = -10; j <= 10; j++) {
244-
[ j, BigNum(j) ].forEach(function (jj) {
244+
[j, BigNum(j)].forEach(function (jj) {
245245
t.deepEqual(bi.lt(jj), i < j)
246246
t.deepEqual(bi.le(jj), i <= j)
247247
t.deepEqual(bi.eq(jj), i === j)
@@ -256,8 +256,8 @@ test('cmp', { timeout: 120000 }, function (t) {
256256
})
257257

258258
test('powm', { timeout: 120000 }, function (t) {
259-
var twos = [ 2, '2', BigNum(2), BigNum('2') ]
260-
var tens = [ 100000, '100000', BigNum(100000), BigNum(100000) ]
259+
var twos = [2, '2', BigNum(2), BigNum('2')]
260+
var tens = [100000, '100000', BigNum(100000), BigNum(100000)]
261261
twos.forEach(function (two) {
262262
tens.forEach(function (ten) {
263263
t.deepEqual(
@@ -278,7 +278,7 @@ test('powm', { timeout: 120000 }, function (t) {
278278
})
279279

280280
test('pow', { timeout: 120000 }, function (t) {
281-
[ 2, '2', BigNum(2), BigNum('2') ].forEach(function (two) {
281+
[2, '2', BigNum(2), BigNum('2')].forEach(function (two) {
282282
t.deepEqual(
283283
BigNum('111111111').pow(two).toString(),
284284
'12345678987654321'
@@ -436,7 +436,7 @@ test('primes', { timeout: 120000 }, function (t) {
436436
'5628290459057877291809182450381238927697314822133923421169378062922140081498734424133112032854812293'
437437
]
438438

439-
;[ uniques, wagstaff, big ].forEach(function (xs) {
439+
;[uniques, wagstaff, big].forEach(function (xs) {
440440
xs.forEach(function (x) {
441441
var p = BigNum(x).probPrime()
442442
t.ok(p === true || p === 'maybe')

‎test/buf.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ test('buf_to_from', function (t) {
105105
})
106106

107107
test('toBuf', function (t) {
108-
var buf = Buffer.from([ 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f ])
108+
var buf = Buffer.from([0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f])
109109
var b = BigNum(
110110
0x0a * 256 * 256 * 256 * 256 * 256 +
111111
0x0b * 256 * 256 * 256 * 256 +
@@ -119,12 +119,12 @@ test('toBuf', function (t) {
119119

120120
t.deepEqual(
121121
[].slice.call(b.toBuffer({ endian: 'big', size: 2 })),
122-
[ 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f ]
122+
[0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f]
123123
)
124124

125125
t.deepEqual(
126126
[].slice.call(b.toBuffer({ endian: 'little', size: 2 })),
127-
[ 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e ]
127+
[0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e]
128128
)
129129

130130
t.deepEqual(
@@ -136,14 +136,14 @@ test('toBuf', function (t) {
136136
[].slice.call(BigNum(43135012110).toBuffer({
137137
endian: 'little', size: 4
138138
})),
139-
[ 0x0a, 0x00, 0x00, 0x00, 0x0e, 0x0d, 0x0c, 0x0b ]
139+
[0x0a, 0x00, 0x00, 0x00, 0x0e, 0x0d, 0x0c, 0x0b]
140140
)
141141

142142
t.deepEqual(
143143
[].slice.call(BigNum(43135012110).toBuffer({
144144
endian: 'big', size: 4
145145
})),
146-
[ 0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e ]
146+
[0x00, 0x00, 0x00, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e]
147147
)
148148

149149
t.end()
@@ -154,12 +154,12 @@ test('zeroPad', function (t) {
154154

155155
t.deepEqual(
156156
[].slice.call(b.toBuffer({ endian: 'big', size: 4 })),
157-
[ 0x00, 0x12, 0x34, 0x56 ]
157+
[0x00, 0x12, 0x34, 0x56]
158158
)
159159

160160
t.deepEqual(
161161
[].slice.call(b.toBuffer({ endian: 'little', size: 4 })),
162-
[ 0x56, 0x34, 0x12, 0x00 ]
162+
[0x56, 0x34, 0x12, 0x00]
163163
)
164164

165165
t.end()
@@ -170,15 +170,15 @@ test('toMpint', function (t) {
170170
// http://tools.ietf.org/html/rfc4251#page-10
171171

172172
var refs = {
173-
'0': Buffer.from([ 0x00, 0x00, 0x00, 0x00 ]),
173+
0: Buffer.from([0x00, 0x00, 0x00, 0x00]),
174174
'9a378f9b2e332a7': Buffer.from([
175175
0x00, 0x00, 0x00, 0x08,
176176
0x09, 0xa3, 0x78, 0xf9,
177177
0xb2, 0xe3, 0x32, 0xa7
178178
]),
179-
'80': Buffer.from([ 0x00, 0x00, 0x00, 0x02, 0x00, 0x80 ]),
180-
'-1234': Buffer.from([ 0x00, 0x00, 0x00, 0x02, 0xed, 0xcc ]),
181-
'-deadbeef': Buffer.from([ 0x00, 0x00, 0x00, 0x05, 0xff, 0x21, 0x52, 0x41, 0x11 ])
179+
80: Buffer.from([0x00, 0x00, 0x00, 0x02, 0x00, 0x80]),
180+
'-1234': Buffer.from([0x00, 0x00, 0x00, 0x02, 0xed, 0xcc]),
181+
'-deadbeef': Buffer.from([0x00, 0x00, 0x00, 0x05, 0xff, 0x21, 0x52, 0x41, 0x11])
182182
}
183183

184184
Object.keys(refs).forEach(function (key) {

0 commit comments

Comments
 (0)
Please sign in to comment.