Revert "Updates node_modules and update script"
This reverts commit 4df552c6524c91c8d94ed318eedcf288a72a064f.
Reason for revert: Breaks esprima.
Original change's description:
> Updates node_modules and update script
>
> Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
TBR=yangguo@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org
Change-Id: Iad2bcdf98a486476715d1e829cdce450c5f218af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880098
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
diff --git a/node_modules/buffer/index.js b/node_modules/buffer/index.js
index 19b0468..92a3abb 100644
--- a/node_modules/buffer/index.js
+++ b/node_modules/buffer/index.js
@@ -10,10 +10,7 @@
var base64 = require('base64-js')
var ieee754 = require('ieee754')
-var customInspectSymbol =
- (typeof Symbol === 'function' && typeof Symbol.for === 'function')
- ? Symbol.for('nodejs.util.inspect.custom')
- : null
+var customInspectSymbol = typeof Symbol === 'function' ? Symbol.for('nodejs.util.inspect.custom') : null
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
@@ -1068,7 +1065,7 @@
var out = ''
for (var i = start; i < end; ++i) {
- out += hexSliceLookupTable[buf[i]]
+ out += toHex(buf[i])
}
return out
}
@@ -1595,8 +1592,6 @@
}
} else if (typeof val === 'number') {
val = val & 255
- } else if (typeof val === 'boolean') {
- val = Number(val)
}
// Invalid ranges are not set to a default, so can range check early.
@@ -1654,6 +1649,11 @@
return str
}
+function toHex (n) {
+ if (n < 16) return '0' + n.toString(16)
+ return n.toString(16)
+}
+
function utf8ToBytes (string, units) {
units = units || Infinity
var codePoint
@@ -1783,17 +1783,3 @@
// For IE11 support
return obj !== obj // eslint-disable-line no-self-compare
}
-
-// Create lookup table for `toString('hex')`
-// See: https://github.com/feross/buffer/issues/219
-var hexSliceLookupTable = (function () {
- var alphabet = '0123456789abcdef'
- var table = new Array(256)
- for (var i = 0; i < 16; ++i) {
- var i16 = i * 16
- for (var j = 0; j < 16; ++j) {
- table[i16 + j] = alphabet[i] + alphabet[j]
- }
- }
- return table
-})()