Update checked-in dependencies
This commit is contained in:
parent
1afca056e3
commit
6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions
17
node_modules/es-abstract/2016/GetValueFromBuffer.js
generated
vendored
17
node_modules/es-abstract/2016/GetValueFromBuffer.js
generated
vendored
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $TypeError = require('es-errors/type');
|
||||
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
|
@ -22,18 +22,7 @@ var IsDetachedBuffer = require('./IsDetachedBuffer');
|
|||
var isArrayBuffer = require('is-array-buffer');
|
||||
var safeConcat = require('safe-array-concat');
|
||||
|
||||
var table49 = {
|
||||
__proto__: null,
|
||||
$Int8: 1,
|
||||
$Uint8: 1,
|
||||
$Uint8C: 1,
|
||||
$Int16: 2,
|
||||
$Uint16: 2,
|
||||
$Int32: 4,
|
||||
$Uint32: 4,
|
||||
$Float32: 4,
|
||||
$Float64: 8
|
||||
};
|
||||
var tableTAO = require('./tables/typed-array-objects');
|
||||
|
||||
var isUnsignedElementType = function isUnsignedElementType(type) { return $charAt(type, 0) === 'U'; };
|
||||
|
||||
|
|
@ -68,7 +57,7 @@ module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type) {
|
|||
|
||||
// 4. Let block be arrayBuffer’s [[ArrayBufferData]] internal slot.
|
||||
|
||||
var elementSize = table49['$' + type]; // step 5
|
||||
var elementSize = tableTAO.size['$' + type]; // step 5
|
||||
if (!elementSize) {
|
||||
throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue