UNPKG

chrono-forge

Version:

A comprehensive framework for building resilient Temporal workflows, advanced state management, and real-time streaming activities in TypeScript. Designed for a seamless developer experience with powerful abstractions, dynamic orchestration, and full cont

12 lines (11 loc) 459 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.unflatten = unflatten; const ramda_1 = require("ramda"); function unflatten(nestedObject) { return (0, ramda_1.reduce)((mem, key) => { const pathParts = (0, ramda_1.split)('_', key); const pathValue = (0, ramda_1.path)([key], nestedObject); return (0, ramda_1.assocPath)(pathParts, pathValue, mem); }, {}, (0, ramda_1.keys)(nestedObject)); }