Initialisation
Added the packages and files for the backend server
This commit is contained in:
13
node_modules/graphql/jsutils/mapValue.mjs
generated
vendored
Normal file
13
node_modules/graphql/jsutils/mapValue.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Creates an object map with the same keys as `map` and values generated by
|
||||
* running each value of `map` thru `fn`.
|
||||
*/
|
||||
export function mapValue(map, fn) {
|
||||
const result = Object.create(null);
|
||||
|
||||
for (const key of Object.keys(map)) {
|
||||
result[key] = fn(map[key], key);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user