A zero-dependency alternative to cosmiconfig for loading configuration files
89
A utility that loads configuration files from specified file paths and returns the parsed configuration data.
@generates
/**
* Loads a configuration file from the specified path.
*
* @param {string} filepath - The path to the configuration file
* @returns {Promise<Object|null>} A promise that resolves to an object with { config, filepath } if successful, or null if not found
* @throws {Error} Throws an error if filepath is an empty string
*/
async function loadConfigFile(filepath) {
// IMPLEMENTATION HERE
}
module.exports = { loadConfigFile };Provides configuration file search and loading capabilities.
Install with Tessl CLI
npx tessl i tessl/npm-lilconfigdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10