Initialisation
Added the packages and files for the backend server
This commit is contained in:
17
node_modules/graphql/jsutils/toObjMap.mjs
generated
vendored
Normal file
17
node_modules/graphql/jsutils/toObjMap.mjs
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
export function toObjMap(obj) {
|
||||
if (obj == null) {
|
||||
return Object.create(null);
|
||||
}
|
||||
|
||||
if (Object.getPrototypeOf(obj) === null) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
const map = Object.create(null);
|
||||
|
||||
for (const [key, value] of Object.entries(obj)) {
|
||||
map[key] = value;
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
Reference in New Issue
Block a user