upgrade bn.js

This commit is contained in:
Feross Aboukhadijeh 2014-05-11 23:58:42 -07:00
parent d0c1caf83b
commit bbe2fa35bf
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
exports.Client = Client
exports.Server = Server
var bn = require('bn.js')
var BN = require('bn.js')
var bncode = require('bncode')
var compact2string = require('compact2string')
var dgram = require('dgram')
@ -702,7 +702,7 @@ function toUInt32 (n) {
function toUInt64 (n) {
if (n > MAX_UINT || typeof n === 'string') {
var bytes = bn(n).toArray()
var bytes = new BN(n).toArray()
while (bytes.length < 8) {
bytes.unshift(0)
}

View File

@ -19,7 +19,7 @@
"querystring": "^0.2.0",
"run-parallel": "^1.0.0",
"string2compact": "^1.1.0",
"bn.js": "^0.3.1"
"bn.js": "^0.4.3"
},
"devDependencies": {
"parse-torrent": "^1.1.0",