{"name":"tiny-editorconfig","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-editorconfig.git"},"description":"A tiny isomorphic parser and resolver for EditorConfig.","license":"MIT","version":"1.0.2","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"benchmark":"tsex benchmark","benchmark:watch":"tsex benchmark --watch","clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["editorconfig","parser","resolver"],"dependencies":{"ini-simple-parser":"^1.0.1","zeptomatch":"^2.1.0"},"devDependencies":{"benchloop":"^2.1.1","fava":"^0.3.5","tsex":"^4.0.2","typescript":"^5.9.3"},"_id":"tiny-editorconfig@1.0.2","gitHead":"7e2618291c1b9a00436608fc5aef44e3a41f2077","bugs":{"url":"https://github.com/fabiospampinato/tiny-editorconfig/issues"},"homepage":"https://github.com/fabiospampinato/tiny-editorconfig#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-QVxndBgsEs5NMdOiUcZhj191moZW3yk0X6b7ItAqIkUGkSLl1IlfkXbraImOEyGqhRynWJjdFkn0a//smQV3GQ==","shasum":"1bfba5b46dc808b6200e1506c5596dfeba3db508","tarball":"http://registry-npm.ywwl.com/tiny-editorconfig/download/tiny-editorconfig-1.0.2.tgz","fileCount":17,"unpackedSize":10132,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQChuIYC8PNHzR6hi6FeWmah8NGgArKeZJrmC9oq6U4r4gIgA/ApHZmhGE4kZwmL3bzM7yVMyJIXsFMWQvivYrEk9Xs="}],"size":3651,"noattachment":false,"key":"/tiny-editorconfig/-/tiny-editorconfig-1.0.2.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tiny-editorconfig_1.0.2_1771708710293_0.12913756157204204"},"_hasShrinkwrap":false,"readme":"# Tiny EditorConfig\n\nA tiny isomorphic parser and resolver for [EditorConfig](https://editorconfig.org/).\n\n## Install\n\n```sh\nnpm install tiny-editorconfig\n```\n\n## Usage\n\n```ts\nimport * as EditorConfig from 'tiny-editorconfig';\n\n// It can parse an .editorconfig string\n\nconst INPUT1 = `\n  root=true\n\n  [*]\n  charset = UTF-8\n  end_of_line = lf\n  indent_size = 2\n  indent_style = \"space\"\n  insert_final_newline = true\n  trim_trailing_whitespace = true\n\n  [*.md]\n  trim_trailing_whitespace = false\n`;\n\nconst parsed1 = EditorConfig.parse ( INPUT1 );\n// {\n//   root: true,\n//   overrides: {\n//     '*': {\n//       charset: 'utf-8',\n//       endOfLine: 'lf',\n//       indentSize: 2,\n//       indentStyle: 'space',\n//       insertFinalNewline: true,\n//       trimTrailingWhitespace: true\n//     },\n//     '*.md': {\n//       trimTrailingWhitespace: false\n//     }\n//   }\n// }\n\nconst INPUT2 = `\n  [*]\n  end_of_line = crlf\n  indent_size = 4\n`;\n\nconst parsed2 = EditorConfig.parse ( INPUT2 );\n// {\n//   overrides: {\n//     '*': {\n//       endOfLine: 'crlf',\n//       indentSize: 4\n//     }\n//   }\n// }\n\n// It can resolve multiple configurations for a given path\n\nconst resolved = resolve ( [PARSED1, PARSED2], '/path/to/test.md' );\n// {\n//   root: true,\n//   charset: 'utf-8',\n//   endOfLine: 'crlf',\n//   indentSize: 4,\n//   indentStyle: 'space',\n//   insertFinalNewline: true,\n//   trimTrailingWhitespace: false\n// }\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1771708710427,"_cnpm_publish_time":1771708710427,"dist-tags":{"latest":"1.0.2"}}