Search Config: Get and merge configuration, for Node and Deno
TypeScript (JavaScript) package to get and merge configuration, made for Node.js and Deno.
Home Page & Docs (searchconfig.js.org) | GitHub repo | npm package | Deno Module
A lightweight alternative to cosmiconfig, it is easy to use, fully customizable and predictable, and has clear error types that are simple to handle.
For now it's an alpha release and I'll improve the documentation. But it should be usable and there is auto-generated API doc you can read.
- npm
- Yarn
Basic Usage:
With YAML:
The stra
variable, which represents a default config get strategy, looks like this (the previous one take precedence over the next ones):
Use mergeConfig()
: