{"name":"tiny-editorconfig","version":"1.0.1","keywords":["editorconfig","parser","resolver"],"_id":"tiny-editorconfig@1.0.1","maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"homepage":"https://github.com/fabiospampinato/tiny-editorconfig#readme","bugs":{"url":"https://github.com/fabiospampinato/tiny-editorconfig/issues"},"dist":{"shasum":"62716ee5b16bd3459118ed0340117706d68eb7c2","tarball":"http://registry-npm.ywwl.com/tiny-editorconfig/download/tiny-editorconfig-1.0.1.tgz","fileCount":29,"integrity":"sha512-V6AW3vnBrhhtYBPdTFTMaPNlziyNdyReG5wTbfYnKSy6nHScI/vfmtFuDx9sjpgOCutK+QpW+LVAl4QigdLssw==","signatures":[{"sig":"MEQCIHl4aflf8uQQg21zlc8Hak/4P+dgBNNnnW1ZsPFDqZKXAiB87HBrNP2gb7jygIoOngVoUqhzXNugNCrDR26SEr/P1g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18231,"size":5257,"noattachment":false,"key":"/tiny-editorconfig/-/tiny-editorconfig-1.0.1.tgz"},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"8d526925a615bea8cdb42a8511067d32fd110b06","scripts":{"test":"tsex test","clean":"tsex clean","compile":"tsex compile","benchmark":"tsex benchmark","test:watch":"tsex test --watch","compile:watch":"tsex compile --watch","prepublishOnly":"tsex prepare","benchmark:watch":"tsex benchmark --watch"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"repository":{"url":"git+https://github.com/fabiospampinato/tiny-editorconfig.git","type":"git"},"_npmVersion":"10.2.3","description":"A tiny isomorphic parser and resolver for EditorConfig.","directories":{},"_nodeVersion":"18.19.0","dependencies":{"zeptomatch":"^2.0.2","ini-simple-parser":"^1.0.1"},"_hasShrinkwrap":false,"devDependencies":{"fava":"^0.3.1","tsex":"^3.0.1","benchloop":"^2.1.1","typescript":"^5.2.2"},"_npmOperationalInternal":{"tmp":"tmp/tiny-editorconfig_1.0.1_1760474078260_0.7898279275243179","host":"s3://npm-registry-packages-npm-production"},"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":1760474078452,"_cnpm_publish_time":1760474078452,"dist-tags":{"latest":"1.0.2"}}