UNPKG

graphql-compose

Version:

GraphQL schema builder from different data sources with middleware extensions.

15 lines 487 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toDottedObject = toDottedObject; function toDottedObject(obj, target = {}, path = []) { Object.keys(obj).forEach((key) => { if (Object(obj[key]) === obj[key]) { toDottedObject(obj[key], target, path.concat(key)); } else { target[path.concat(key).join('.')] = obj[key]; } }); return target; } //# sourceMappingURL=toDottedObject.js.map