Initial Save

This commit is contained in:
jackbeeby
2025-03-28 12:30:19 +11:00
parent e381994f19
commit d8773925e8
9910 changed files with 982718 additions and 0 deletions

29
node_modules/graphql/polyfills/flatMap.js.flow generated vendored Normal file
View File

@@ -0,0 +1,29 @@
// @flow strict
declare function flatMap<T, U>(
list: $ReadOnlyArray<T>,
fn: (item: T, index: number) => $ReadOnlyArray<U> | U,
): Array<U>;
// Workaround to make older Flow versions happy
const flatMapMethod = (Array.prototype: any).flatMap;
/* eslint-disable no-redeclare */
// $FlowFixMe
const flatMap = flatMapMethod
? function(list, fn) {
return flatMapMethod.call(list, fn);
}
: function(list, fn) {
let result = [];
for (const item of list) {
const value = fn(item);
if (Array.isArray(value)) {
result = result.concat(value);
} else {
result.push(value);
}
}
return result;
};
export default flatMap;