From 23563c7188e089929b60f9e10721c6fc43a220ff Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Thu, 22 Jun 2023 23:06:12 +0200 Subject: Updated 15 files, added includes/maintenance/deleteUnusedAssets.php and deleted 4944 files (automated) --- .../graphql/subscription/mapAsyncIterator.js | 86 ---------------------- 1 file changed, 86 deletions(-) delete mode 100644 includes/external/school/node_modules/graphql/subscription/mapAsyncIterator.js (limited to 'includes/external/school/node_modules/graphql/subscription/mapAsyncIterator.js') diff --git a/includes/external/school/node_modules/graphql/subscription/mapAsyncIterator.js b/includes/external/school/node_modules/graphql/subscription/mapAsyncIterator.js deleted file mode 100644 index 4fd37cd..0000000 --- a/includes/external/school/node_modules/graphql/subscription/mapAsyncIterator.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = mapAsyncIterator; - -var _symbols = require("../polyfills/symbols.js"); - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -/** - * Given an AsyncIterable and a callback function, return an AsyncIterator - * which produces values mapped via calling the callback function. - */ -function mapAsyncIterator(iterable, callback, rejectCallback) { - // $FlowFixMe[prop-missing] - var iteratorMethod = iterable[_symbols.SYMBOL_ASYNC_ITERATOR]; - var iterator = iteratorMethod.call(iterable); - var $return; - var abruptClose; - - if (typeof iterator.return === 'function') { - $return = iterator.return; - - abruptClose = function abruptClose(error) { - var rethrow = function rethrow() { - return Promise.reject(error); - }; - - return $return.call(iterator).then(rethrow, rethrow); - }; - } - - function mapResult(result) { - return result.done ? result : asyncMapValue(result.value, callback).then(iteratorResult, abruptClose); - } - - var mapReject; - - if (rejectCallback) { - // Capture rejectCallback to ensure it cannot be null. - var reject = rejectCallback; - - mapReject = function mapReject(error) { - return asyncMapValue(error, reject).then(iteratorResult, abruptClose); - }; - } - /* TODO: Flow doesn't support symbols as keys: - https://github.com/facebook/flow/issues/3258 */ - - - return _defineProperty({ - next: function next() { - return iterator.next().then(mapResult, mapReject); - }, - return: function _return() { - return $return ? $return.call(iterator).then(mapResult, mapReject) : Promise.resolve({ - value: undefined, - done: true - }); - }, - throw: function _throw(error) { - if (typeof iterator.throw === 'function') { - return iterator.throw(error).then(mapResult, mapReject); - } - - return Promise.reject(error).catch(abruptClose); - } - }, _symbols.SYMBOL_ASYNC_ITERATOR, function () { - return this; - }); -} - -function asyncMapValue(value, callback) { - return new Promise(function (resolve) { - return resolve(callback(value)); - }); -} - -function iteratorResult(value) { - return { - value: value, - done: false - }; -} -- cgit