Files
e-tib.com/node_modules/.pnpm/graphql@16.13.2/node_modules/graphql/jsutils/toObjMap.js
Marc Mintel d14122005d Initial commit: E-TIB production hardening & E2E foundation
Former-commit-id: ef04fca3d76375630c05aac117bf586953f3b657
2026-04-28 19:11:38 +02:00

25 lines
391 B
JavaScript

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.toObjMap = toObjMap;
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;
}