Tiny EditorConfig
A tiny isomorphic parser and resolver for EditorConfig.
Install
npm install --save tiny-editorconfig
Usage
import * as EditorConfig from 'tiny-editorconfig';
const INPUT1 = `
root=true
[*]
charset = UTF-8
end_of_line = lf
indent_size = 2
indent_style = "space"
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
`;
const parsed1 = EditorConfig.parse ( INPUT );
const INPUT2 = `
[*]
end_of_line = crlf
indent_size = 4
`;
const parsed2 = EditorConfig.parse ( INPUT );
const resolved = resolve ( [PARSED1, PARSED2], '/path/to/test.md' );
License
MIT © Fabio Spampinato