Comparing version 1.0.0 to 1.0.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function getOrElse(config, path, fallback) { | ||
if (config.has(path)) | ||
return config.get(path); | ||
return fallback; | ||
} | ||
exports.getOrElse = getOrElse; | ||
function assert(config, path, message) { | ||
if (!config.has(path)) { | ||
throw new Error('missing required config: ' + path + message ? '. ' + message : ''); | ||
} | ||
} | ||
exports.assert = assert; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "config-ext", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "helpful extension methods for [`config`](https://www.npmjs.com/package/config)", | ||
@@ -8,2 +8,6 @@ "repository": "git@github.com:js-n/config-ext.git", | ||
"types": "obj", | ||
"files": [ | ||
"obj/*.js", | ||
"obj/*.d.ts" | ||
], | ||
"scripts": { | ||
@@ -10,0 +14,0 @@ "test": "echo \"Error: no test specified\" && exit 1" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1698
4
18