How to use the loadYaml function from cosmiconfig
Find comprehensive JavaScript cosmiconfig.loadYaml code examples handpicked from public code repositorys.
GitHub: doytsujin/gqless

29 30 31 32 33 34 35 36 37 38
'.yml': cosmiconfig.loadYaml, '.js': cosmiconfig.loadJs, '.ts': { async: TypeScriptLoader, }, noExt: cosmiconfig.loadYaml } export const getConfig = async (path?: string) => { const configPath = path && parse(resolve(path)).dir
GitHub: OlMue/jsdoc

93 94 95 96 97 98 99 100 101 102
function loadJson(filepath, content) { return cosmiconfig.loadJson(filepath, stripBom(stripJsonComments(content))); } function loadYaml(filepath, content) { return cosmiconfig.loadYaml(filepath, stripBom(content)); } const explorer = cosmiconfig(MODULE_NAME, { cache: false,
cosmiconfig.cosmiconfigSync is the most popular function in cosmiconfig (62 examples)