UNPKG

@digicms/cms

Version:

An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite

22 lines (18 loc) 460 B
'use strict'; const _ = require('lodash'); module.exports = (initialConfig = {}) => { const _config = { ...initialConfig }; // not deep clone because it would break some config return { ..._config, // TODO: to remove get(path, defaultValue) { return _.get(_config, path, defaultValue); }, set(path, val) { _.set(_config, path, val); return this; }, has(path) { return _.has(_config, path); }, }; };