@anandchowdhary/cosmic
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -8,2 +8,2 @@ import { Options, OptionsSync } from "cosmiconfig"; | ||
export declare const clearCosmicCache: () => void; | ||
export declare const config: (key: string) => any; | ||
export declare const config: <T = any>(key: string, defaultValue?: T | undefined) => T; |
@@ -58,3 +58,3 @@ "use strict"; | ||
}; | ||
exports.config = (key) => { | ||
exports.config = (key, defaultValue) => { | ||
if (cachedConfig && cachedConfig[key]) | ||
@@ -64,3 +64,4 @@ return cachedConfig[key]; | ||
return cachedConfigSync[key]; | ||
return defaultValue; | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@anandchowdhary/cosmic", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Find and load configuration for your app, based on cosmiconfig", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
10725
72