tiny-editorconfig is an isomorphic JavaScript/TypeScript library designed to parse and resolve EditorConfig configurations. It provides functionality to take a raw `.editorconfig` string and convert it into a structured JavaScript object, as well as to resolve multiple parsed configurations for a given file path, applying the cascading rules of EditorConfig. The current stable version is 1.0.2. Being isomorphic, it can run seamlessly in both Node.js and browser environments without specific environment dependencies. Its primary differentiator is its minimal footprint and focused scope, offering a lightweight alternative to larger configuration processing tools. Release cadence is expected to be infrequent, primarily for bug fixes or minor specification updates, due to the stability of the EditorConfig specification itself.
npm install tiny-editorconfigVerified import paths — ran on the pinned version, not inferred.
Demonstrates parsing two EditorConfig strings and then resolving them for a given file path to get the final effective configuration.
Manually read `.editorconfig` file content using Node.js `fs` module or browser file APIs before passing to `parse`.
Always interact with the parsed object using normalized keys (e.g., `indentSize` instead of `indent_size`) and expect lowercase values.
Ensure the input string adheres to the EditorConfig format. Check for missing sections, invalid key-value pairs, or unescaped characters.
EditorConfig properties are only present in the resolved object if explicitly defined. Check if the property is expected or provide a fallback value.
No dependency data recorded yet.