diff --git a/lib/security/jsbn.js b/lib/security/jsbn.js index 28ca2f2..209c127 100644 --- a/lib/security/jsbn.js +++ b/lib/security/jsbn.js @@ -1,6 +1,6 @@ /* * Basic JavaScript BN library - subset useful for RSA encryption. - * + * * Copyright (c) 2003-2005 Tom Wu * All Rights Reserved. * @@ -15,9 +15,9 @@ * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER @@ -37,7 +37,7 @@ */ var crypt = require('crypto'); -var _ = require('lodash'); +var isNumber = require('lodash.isnumber'); // Bits per digit var dbits; @@ -112,7 +112,7 @@ function am3(i, x, w, j, c, n) { return c; } -// We need to select the fastest one that works in this environment. +// We need to select the fastest one that works in this environment. //if (j_lm && (navigator.appName == "Microsoft Internet Explorer")) { // BigInteger.prototype.am = am2; // dbits = 30; @@ -832,7 +832,7 @@ function bnToBuffer(trimOrSize) { var res = new Buffer(this.toByteArray()); if (trimOrSize === true && res[0] === 0) { res = res.slice(1); - } else if (_.isNumber(trimOrSize)) { + } else if (isNumber(trimOrSize)) { if (res.length > trimOrSize) { for (var i = 0; i < res.length - trimOrSize; i++) { if (res[i] !== 0) { diff --git a/package-lock.json b/package-lock.json index 06d0a7b..a79de8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -467,10 +467,10 @@ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", "optional": true }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" }, "longest": { "version": "1.0.1", diff --git a/package.json b/package.json index 377a7ef..657964a 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,6 @@ "az-bunyan": "0.2.0-alpha.2", "azure-storage": "^2.8.2", "bunyan": "^1.8.12", - "lodash": "^4.17.10" + "lodash.isnumber": "^3.0.3" } }