diff options
Diffstat (limited to 'includes/external/school/node_modules/graphql/jsutils/mapValue.js.flow')
-rw-r--r-- | includes/external/school/node_modules/graphql/jsutils/mapValue.js.flow | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/includes/external/school/node_modules/graphql/jsutils/mapValue.js.flow b/includes/external/school/node_modules/graphql/jsutils/mapValue.js.flow deleted file mode 100644 index d6b5da4..0000000 --- a/includes/external/school/node_modules/graphql/jsutils/mapValue.js.flow +++ /dev/null @@ -1,20 +0,0 @@ -// @flow strict -import objectEntries from '../polyfills/objectEntries'; - -import type { ObjMap } from './ObjMap'; - -/** - * Creates an object map with the same keys as `map` and values generated by - * running each value of `map` thru `fn`. - */ -export default function mapValue<T, V>( - map: ObjMap<T>, - fn: (value: T, key: string) => V, -): ObjMap<V> { - const result = Object.create(null); - - for (const [key, value] of objectEntries(map)) { - result[key] = fn(value, key); - } - return result; -} |