.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / typed-array-constructors-require-wrappers.js
1 /* eslint-disable no-new -- required for testing */
2 var global = require('../internals/global');
3 var fails = require('../internals/fails');
4 var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');
5 var NATIVE_ARRAY_BUFFER_VIEWS = require('../internals/array-buffer-view-core').NATIVE_ARRAY_BUFFER_VIEWS;
6
7 var ArrayBuffer = global.ArrayBuffer;
8 var Int8Array = global.Int8Array;
9
10 module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
11   Int8Array(1);
12 }) || !fails(function () {
13   new Int8Array(-1);
14 }) || !checkCorrectnessOfIteration(function (iterable) {
15   new Int8Array();
16   new Int8Array(null);
17   new Int8Array(1.5);
18   new Int8Array(iterable);
19 }, true) || fails(function () {
20   // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
21   return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
22 });