UNPKG

zents

Version:

ZenTS is a Node.js & TypeScript MVC-Framework for building rich web applications, released as free and open-source software under the MIT License. It is designed for building web applications with modern tools and design patterns.

19 lines 530 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.unset = void 0; function unset(obj, path) { if (!obj || !path) { return; } const paths = path.split('.'); for (let i = 0; i < paths.length - 1; i++) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment obj = obj[paths[i]]; if (typeof obj === 'undefined') { return; } } delete obj[paths.pop()]; } exports.unset = unset; //# sourceMappingURL=unset.js.map