diff options
author | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
commit | 2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 (patch) | |
tree | 17848d95522dab25d3cdeb9c4a6450e2a234861f /alarm/node_modules/graphql/polyfills | |
parent | 108525534c28013cfe1897c30e4565f9893f3766 (diff) | |
download | pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.gz pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.bz2 pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.zip |
Update
Diffstat (limited to 'alarm/node_modules/graphql/polyfills')
21 files changed, 411 insertions, 0 deletions
diff --git a/alarm/node_modules/graphql/polyfills/arrayFrom.js b/alarm/node_modules/graphql/polyfills/arrayFrom.js new file mode 100644 index 0000000..0f2eab2 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/arrayFrom.js @@ -0,0 +1,57 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _symbols = require("./symbols.js"); + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] +var arrayFrom = Array.from || function (obj, mapFn, thisArg) { + if (obj == null) { + throw new TypeError('Array.from requires an array-like object - not null or undefined'); + } // Is Iterable? + + + var iteratorMethod = obj[_symbols.SYMBOL_ITERATOR]; + + if (typeof iteratorMethod === 'function') { + var iterator = iteratorMethod.call(obj); + var result = []; + var step; + + for (var i = 0; !(step = iterator.next()).done; ++i) { + result.push(mapFn.call(thisArg, step.value, i)); // Infinite Iterators could cause forEach to run forever. + // After a very large number of iterations, produce an error. + // istanbul ignore if (Too big to actually test) + + if (i > 9999999) { + throw new TypeError('Near-infinite iteration.'); + } + } + + return result; + } // Is Array like? + + + var length = obj.length; + + if (typeof length === 'number' && length >= 0 && length % 1 === 0) { + var _result = []; + + for (var _i = 0; _i < length; ++_i) { + if (Object.prototype.hasOwnProperty.call(obj, _i)) { + _result.push(mapFn.call(thisArg, obj[_i], _i)); + } + } + + return _result; + } + + return []; +}; + +var _default = arrayFrom; +exports.default = _default; diff --git a/alarm/node_modules/graphql/polyfills/arrayFrom.js.flow b/alarm/node_modules/graphql/polyfills/arrayFrom.js.flow new file mode 100644 index 0000000..73093b7 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/arrayFrom.js.flow @@ -0,0 +1,58 @@ +// @flow strict +import { SYMBOL_ITERATOR } from './symbols'; + +declare function arrayFrom<T>(arrayLike: Iterable<T>): Array<T>; +// eslint-disable-next-line no-redeclare +declare function arrayFrom<T: mixed>( + arrayLike: mixed, + mapFn?: (elem: mixed, index: number) => T, + thisArg?: mixed, +): Array<T>; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] +const arrayFrom = + Array.from || + function (obj, mapFn, thisArg) { + if (obj == null) { + throw new TypeError( + 'Array.from requires an array-like object - not null or undefined', + ); + } + + // Is Iterable? + const iteratorMethod = obj[SYMBOL_ITERATOR]; + if (typeof iteratorMethod === 'function') { + const iterator = iteratorMethod.call(obj); + const result = []; + let step; + + for (let i = 0; !(step = iterator.next()).done; ++i) { + result.push(mapFn.call(thisArg, step.value, i)); + // Infinite Iterators could cause forEach to run forever. + // After a very large number of iterations, produce an error. + // istanbul ignore if (Too big to actually test) + if (i > 9999999) { + throw new TypeError('Near-infinite iteration.'); + } + } + return result; + } + + // Is Array like? + const length = obj.length; + if (typeof length === 'number' && length >= 0 && length % 1 === 0) { + const result = []; + + for (let i = 0; i < length; ++i) { + if (Object.prototype.hasOwnProperty.call(obj, i)) { + result.push(mapFn.call(thisArg, obj[i], i)); + } + } + return result; + } + + return []; + }; + +export default arrayFrom; diff --git a/alarm/node_modules/graphql/polyfills/arrayFrom.mjs b/alarm/node_modules/graphql/polyfills/arrayFrom.mjs new file mode 100644 index 0000000..1ea59f0 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/arrayFrom.mjs @@ -0,0 +1,49 @@ +import { SYMBOL_ITERATOR } from "./symbols.mjs"; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] +var arrayFrom = Array.from || function (obj, mapFn, thisArg) { + if (obj == null) { + throw new TypeError('Array.from requires an array-like object - not null or undefined'); + } // Is Iterable? + + + var iteratorMethod = obj[SYMBOL_ITERATOR]; + + if (typeof iteratorMethod === 'function') { + var iterator = iteratorMethod.call(obj); + var result = []; + var step; + + for (var i = 0; !(step = iterator.next()).done; ++i) { + result.push(mapFn.call(thisArg, step.value, i)); // Infinite Iterators could cause forEach to run forever. + // After a very large number of iterations, produce an error. + // istanbul ignore if (Too big to actually test) + + if (i > 9999999) { + throw new TypeError('Near-infinite iteration.'); + } + } + + return result; + } // Is Array like? + + + var length = obj.length; + + if (typeof length === 'number' && length >= 0 && length % 1 === 0) { + var _result = []; + + for (var _i = 0; _i < length; ++_i) { + if (Object.prototype.hasOwnProperty.call(obj, _i)) { + _result.push(mapFn.call(thisArg, obj[_i], _i)); + } + } + + return _result; + } + + return []; +}; + +export default arrayFrom; diff --git a/alarm/node_modules/graphql/polyfills/find.js b/alarm/node_modules/graphql/polyfills/find.js new file mode 100644 index 0000000..fb14137 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/find.js @@ -0,0 +1,22 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] +var find = Array.prototype.find ? function (list, predicate) { + return Array.prototype.find.call(list, predicate); +} : function (list, predicate) { + for (var _i2 = 0; _i2 < list.length; _i2++) { + var value = list[_i2]; + + if (predicate(value)) { + return value; + } + } +}; +var _default = find; +exports.default = _default; diff --git a/alarm/node_modules/graphql/polyfills/find.js.flow b/alarm/node_modules/graphql/polyfills/find.js.flow new file mode 100644 index 0000000..4ed151c --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/find.js.flow @@ -0,0 +1,20 @@ +// @flow strict +declare function find<T>( + list: $ReadOnlyArray<T>, + predicate: (item: T) => boolean, +): T | void; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] +const find = Array.prototype.find + ? function (list, predicate) { + return Array.prototype.find.call(list, predicate); + } + : function (list, predicate) { + for (const value of list) { + if (predicate(value)) { + return value; + } + } + }; +export default find; diff --git a/alarm/node_modules/graphql/polyfills/find.mjs b/alarm/node_modules/graphql/polyfills/find.mjs new file mode 100644 index 0000000..ed3e6f3 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/find.mjs @@ -0,0 +1,14 @@ +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] +var find = Array.prototype.find ? function (list, predicate) { + return Array.prototype.find.call(list, predicate); +} : function (list, predicate) { + for (var _i2 = 0; _i2 < list.length; _i2++) { + var value = list[_i2]; + + if (predicate(value)) { + return value; + } + } +}; +export default find; diff --git a/alarm/node_modules/graphql/polyfills/isFinite.js b/alarm/node_modules/graphql/polyfills/isFinite.js new file mode 100644 index 0000000..9c0e559 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/isFinite.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var isFinitePolyfill = Number.isFinite || function (value) { + return typeof value === 'number' && isFinite(value); +}; + +var _default = isFinitePolyfill; +exports.default = _default; diff --git a/alarm/node_modules/graphql/polyfills/isFinite.js.flow b/alarm/node_modules/graphql/polyfills/isFinite.js.flow new file mode 100644 index 0000000..5dd0229 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/isFinite.js.flow @@ -0,0 +1,13 @@ +// @flow strict +declare function isFinitePolyfill( + value: mixed, +): boolean %checks(typeof value === 'number'); + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +const isFinitePolyfill = + Number.isFinite || + function (value) { + return typeof value === 'number' && isFinite(value); + }; +export default isFinitePolyfill; diff --git a/alarm/node_modules/graphql/polyfills/isFinite.mjs b/alarm/node_modules/graphql/polyfills/isFinite.mjs new file mode 100644 index 0000000..7c1aea6 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/isFinite.mjs @@ -0,0 +1,7 @@ +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var isFinitePolyfill = Number.isFinite || function (value) { + return typeof value === 'number' && isFinite(value); +}; + +export default isFinitePolyfill; diff --git a/alarm/node_modules/graphql/polyfills/isInteger.js b/alarm/node_modules/graphql/polyfills/isInteger.js new file mode 100644 index 0000000..9b25361 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/isInteger.js @@ -0,0 +1,15 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var isInteger = Number.isInteger || function (value) { + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; +}; + +var _default = isInteger; +exports.default = _default; diff --git a/alarm/node_modules/graphql/polyfills/isInteger.js.flow b/alarm/node_modules/graphql/polyfills/isInteger.js.flow new file mode 100644 index 0000000..757da92 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/isInteger.js.flow @@ -0,0 +1,16 @@ +// @flow strict +declare function isInteger(value: mixed): boolean %checks(typeof value === + 'number'); + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +const isInteger = + Number.isInteger || + function (value) { + return ( + typeof value === 'number' && + isFinite(value) && + Math.floor(value) === value + ); + }; +export default isInteger; diff --git a/alarm/node_modules/graphql/polyfills/isInteger.mjs b/alarm/node_modules/graphql/polyfills/isInteger.mjs new file mode 100644 index 0000000..3396f16 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/isInteger.mjs @@ -0,0 +1,7 @@ +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var isInteger = Number.isInteger || function (value) { + return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; +}; + +export default isInteger; diff --git a/alarm/node_modules/graphql/polyfills/objectEntries.js b/alarm/node_modules/graphql/polyfills/objectEntries.js new file mode 100644 index 0000000..749d4ef --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/objectEntries.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var objectEntries = Object.entries || function (obj) { + return Object.keys(obj).map(function (key) { + return [key, obj[key]]; + }); +}; + +var _default = objectEntries; +exports.default = _default; diff --git a/alarm/node_modules/graphql/polyfills/objectEntries.js.flow b/alarm/node_modules/graphql/polyfills/objectEntries.js.flow new file mode 100644 index 0000000..d30e3c1 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/objectEntries.js.flow @@ -0,0 +1,11 @@ +// @flow strict +import type { ObjMap } from '../jsutils/ObjMap'; + +declare function objectEntries<T>(obj: ObjMap<T>): Array<[string, T]>; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +const objectEntries = + Object.entries || ((obj) => Object.keys(obj).map((key) => [key, obj[key]])); + +export default objectEntries; diff --git a/alarm/node_modules/graphql/polyfills/objectEntries.mjs b/alarm/node_modules/graphql/polyfills/objectEntries.mjs new file mode 100644 index 0000000..72d0c60 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/objectEntries.mjs @@ -0,0 +1,9 @@ +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var objectEntries = Object.entries || function (obj) { + return Object.keys(obj).map(function (key) { + return [key, obj[key]]; + }); +}; + +export default objectEntries; diff --git a/alarm/node_modules/graphql/polyfills/objectValues.js b/alarm/node_modules/graphql/polyfills/objectValues.js new file mode 100644 index 0000000..ab14e65 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/objectValues.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var objectValues = Object.values || function (obj) { + return Object.keys(obj).map(function (key) { + return obj[key]; + }); +}; + +var _default = objectValues; +exports.default = _default; diff --git a/alarm/node_modules/graphql/polyfills/objectValues.js.flow b/alarm/node_modules/graphql/polyfills/objectValues.js.flow new file mode 100644 index 0000000..343419a --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/objectValues.js.flow @@ -0,0 +1,10 @@ +// @flow strict +import type { ObjMap } from '../jsutils/ObjMap'; + +declare function objectValues<T>(obj: ObjMap<T>): Array<T>; + +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +const objectValues = + Object.values || ((obj) => Object.keys(obj).map((key) => obj[key])); +export default objectValues; diff --git a/alarm/node_modules/graphql/polyfills/objectValues.mjs b/alarm/node_modules/graphql/polyfills/objectValues.mjs new file mode 100644 index 0000000..afbde06 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/objectValues.mjs @@ -0,0 +1,9 @@ +/* eslint-disable no-redeclare */ +// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441 +var objectValues = Object.values || function (obj) { + return Object.keys(obj).map(function (key) { + return obj[key]; + }); +}; + +export default objectValues; diff --git a/alarm/node_modules/graphql/polyfills/symbols.js b/alarm/node_modules/graphql/polyfills/symbols.js new file mode 100644 index 0000000..3d4ba2e --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/symbols.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SYMBOL_TO_STRING_TAG = exports.SYMBOL_ASYNC_ITERATOR = exports.SYMBOL_ITERATOR = void 0; +// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') +var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') + +exports.SYMBOL_ITERATOR = SYMBOL_ITERATOR; +var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') + +exports.SYMBOL_ASYNC_ITERATOR = SYMBOL_ASYNC_ITERATOR; +var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag'; +exports.SYMBOL_TO_STRING_TAG = SYMBOL_TO_STRING_TAG; diff --git a/alarm/node_modules/graphql/polyfills/symbols.js.flow b/alarm/node_modules/graphql/polyfills/symbols.js.flow new file mode 100644 index 0000000..66a1b2c --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/symbols.js.flow @@ -0,0 +1,20 @@ +// @flow strict +// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') +export const SYMBOL_ITERATOR: string = + typeof Symbol === 'function' && Symbol.iterator != null + ? Symbol.iterator + : '@@iterator'; + +// In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') +export const SYMBOL_ASYNC_ITERATOR: string = + typeof Symbol === 'function' && Symbol.asyncIterator != null + ? Symbol.asyncIterator + : '@@asyncIterator'; + +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') +export const SYMBOL_TO_STRING_TAG: string = + typeof Symbol === 'function' && Symbol.toStringTag != null + ? Symbol.toStringTag + : '@@toStringTag'; diff --git a/alarm/node_modules/graphql/polyfills/symbols.mjs b/alarm/node_modules/graphql/polyfills/symbols.mjs new file mode 100644 index 0000000..b338851 --- /dev/null +++ b/alarm/node_modules/graphql/polyfills/symbols.mjs @@ -0,0 +1,8 @@ +// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') +export var SYMBOL_ITERATOR = typeof Symbol === 'function' && Symbol.iterator != null ? Symbol.iterator : '@@iterator'; // In ES2017 (or a polyfilled) environment, this will be Symbol.asyncIterator +// istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') + +export var SYMBOL_ASYNC_ITERATOR = typeof Symbol === 'function' && Symbol.asyncIterator != null ? Symbol.asyncIterator : '@@asyncIterator'; // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317') + +export var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag'; |