nlu
Version:
Use this package to link your projects together for local development.
20 lines (19 loc) • 604 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function default_1(opts, confPath, conf, key, value) {
let localSettings = conf.localSettings || {};
if (!(localSettings && typeof localSettings === 'object')) {
localSettings = {};
}
if (Array.isArray(localSettings)) {
localSettings = {};
}
if (!key) {
return console.log(localSettings);
}
if (key in localSettings) {
return console.log(localSettings[key]);
}
console.log(`(NLU local config does not have key: "${key}")`);
}
exports.default = default_1;