@hadss/hmrouter-plugin
Version:
HMRouter Compiler Plugin
15 lines (14 loc) • 376 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ObjectUtils = void 0;
class ObjectUtils {
static ensureNestedObject(obj, path) {
return path.reduce((acc, key) => {
if (!acc[key]) {
acc[key] = {};
}
return acc[key];
}, obj);
}
}
exports.ObjectUtils = ObjectUtils;