{"name":"tiny-editorconfig","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/tiny-editorconfig.git"},"description":"A tiny isomorphic parser and resolver for EditorConfig.","version":"1.0.0","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.0","zeptomatch":"^1.1.3"},"devDependencies":{"benchloop":"^2.1.1","fava":"^0.3.1","tsex":"^3.0.1","typescript":"^5.2.2"},"gitHead":"9cda9b26d1ba28894bb823796f41f2ee71d309d1","bugs":{"url":"https://github.com/fabiospampinato/tiny-editorconfig/issues"},"homepage":"https://github.com/fabiospampinato/tiny-editorconfig#readme","_id":"tiny-editorconfig@1.0.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-rxpWaSurnvPUkL2/qydRH10llK7MD1XfE38zoWTsp/ZWWYnnwPBzGUePBOcXFaNA3cJQm8ItqrofGeRJ6AVaew==","shasum":"5a289d3bf1620fa8f600155492000d62c4651931","tarball":"http://registry-npm.ywwl.com/tiny-editorconfig/download/tiny-editorconfig-1.0.0.tgz","fileCount":29,"unpackedSize":18231,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8eKIv4z1WV92CflB6t9J5nCMa0EURzqa0ckLSHLIRrAIhAPk/M/CAD+dK8ZvSC1NYIs2xjwzer2WVc5EQaLtu/bET"}],"size":5248,"noattachment":false,"key":"/tiny-editorconfig/-/tiny-editorconfig-1.0.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tiny-editorconfig_1.0.0_1700010807213_0.37119492935111653"},"_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 --save 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 ( INPUT );\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 ( INPUT );\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":1700010807449,"_cnpm_publish_time":1700010807449,"dist-tags":{"latest":"1.0.2"}}