0a5ab058a6
- Angular 12 application with PrimeNG components - 5 existing Cypress e2e test suites - SCSS styling with BEM naming convention - i18n support (10 languages) - Leaflet map integration - Complete component hierarchy and routing structure This baseline will be used for Angular → React migration.
30 lines
957 B
JavaScript
30 lines
957 B
JavaScript
'use strict';
|
|
|
|
var $TypeError = require('es-errors/type');
|
|
|
|
var callBound = require('call-bound');
|
|
|
|
var $arrayBufferResizable = callBound('%ArrayBuffer.prototype.resizable%', true);
|
|
var $sharedArrayGrowable = callBound('%SharedArrayBuffer.prototype.growable%', true);
|
|
|
|
var isArrayBuffer = require('is-array-buffer');
|
|
var isSharedArrayBuffer = require('is-shared-array-buffer');
|
|
|
|
// https://262.ecma-international.org/15.0/#sec-isfixedlengtharraybuffer
|
|
|
|
module.exports = function IsFixedLengthArrayBuffer(arrayBuffer) {
|
|
var isAB = isArrayBuffer(arrayBuffer);
|
|
var isSAB = isSharedArrayBuffer(arrayBuffer);
|
|
if (!isAB && !isSAB) {
|
|
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer');
|
|
}
|
|
|
|
if (isAB && $arrayBufferResizable) {
|
|
return !$arrayBufferResizable(arrayBuffer); // step 1
|
|
}
|
|
if (isSAB && $sharedArrayGrowable) {
|
|
return !$sharedArrayGrowable(arrayBuffer); // step 1
|
|
}
|
|
return true; // step 2
|
|
};
|