{"name":"@one-ini/wasm","collaborators":["Jed Mao <jedmao@outlook.com>","Joe Hildebrand <joe-github@cursive.net>","Florian Neumann <florian.neumann@mindkeeper.solutions>"],"description":"Parse EditorConfig-INI file contents into AST","version":"0.2.0","license":"MIT","repository":{"type":"git","url":"git+https://github.com/one-ini/core.git"},"main":"one_ini.js","types":"one_ini.d.ts","keywords":["editorconfig","ini","parser","ast"],"_id":"@one-ini/wasm@0.2.0","gitHead":"cfb2315a213b10136202944e83e0b653b19d8626","bugs":{"url":"https://github.com/one-ini/core/issues"},"homepage":"https://github.com/one-ini/core#readme","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-n+L/BvrwKUn7q5O3wHGo+CJZAqfewh38+37sk+eBzv/39lM9pPgPRd4sOZRvSRzo0ukLxzyXso4WlGj2oKZ5hA==","shasum":"598671af52636ea6e0a849d026ad0e7c110e91cf","tarball":"http://registry-npm.ywwl.com/@one-ini/wasm/download/@one-ini/wasm-0.2.0.tgz","fileCount":6,"unpackedSize":110803,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@one-ini%2fwasm@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGg0vwOL2aMp7olCCz470Be9GAa+lTeFMcEdL0T0DWMEAiBG84zYKFfGHv/P+pDFChZetV+SxZkd3tQ/w6lq1K/TAA=="}],"size":42632,"noattachment":false,"key":"/@one-ini/wasm/-/@one-ini/wasm-0.2.0.tgz"},"_npmUser":{"name":"hildjj","email":"joe-github@cursive.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wasm_0.2.0_1738864576714_0.8584796756889099"},"_hasShrinkwrap":false,"readme":"# One INI\n\nThe core implementation of an AST based, idiomatic INI parser which aims to provide an easy to implement and consistent INI-standard.\n\nThis reference implementation is provided as Rust-library and WASM-package.\n\n<!-- markdownlint-disable -->\n\n[![GitHub Actions](https://github.com/jedmao/editorconfig-ini/workflows/Rust/badge.svg?event=push)](https://github.com/jedmao/editorconfig-ini/actions)\n\n<!-- markdownlint-restore -->\n\n<!-- markdownlint-disable commands-show-output -->\n\nThe work on this project started with the search for an universal parser for the [EditorConfig INI file format specification](https://spec.editorconfig.org/#file-format).\n\n## WASM\n\nTo use from [Web Assembly](https://webassembly.org/), compile with:\n\n```sh\nwasm-pack build --release --target nodejs\n```\n\nand run the (limited) WASM tests with:\n\n```sh\nwasm-pack test --node\n```\n\nYou can call the generated JS wrapper with either:\n\n```js\nimport { parse_to_json } from './pkg/one_ini.js'\n\nconst results = parse_to_json(`\nroot = true\n\n[*]\n# always use unix line endings\nend_of_line = lf\n`)\n\n// {\n//   \"version\": \"0.1.0\",\n//   \"body\": [\n//     { \"type\": \"Pair\", \"key\": \"root\", \"value\": \"true\" },\n//     {\n//       \"type\": \"Section\",\n//       \"name\": \"*\",\n//       \"body\": [\n//         { \"type\": \"Comment\", \"indicator\": \"#\", \"value\": \"always use unix line endings\" },\n//         { \"type\": \"Pair\", \"key\": \"end_of_line\", \"value\": \"lf\" }\n//       ]\n//     }\n//   ]\n// }\n```\n\nor:\n\n```js\nimport { parse_to_uint32array, TokenTypes } from './pkg/editorconfig_ini.js'\nconst buf = Buffer.from(`\nroot = true\n\n[*]\n# always use unix line endings\nend_of_line = lf\n`, 'utf8')\nconst ary = parse_to_uint32array(buf)\n\n// Array with token type, start byte offset, end byte offset for each token\n// Uint32Array(21) [\n//   TokenTypes.Key, 1, 5,\n//   TokenTypes.Value, 8, 12,\n//   TokenTypes.Section, 15, 16,\n//   TokenTypes.CommentIndicator, 18, 19,\n//   TokenTypes.CommentValue, 20, 48,\n//   TokenTypes.Key, 49, 60,\n//   TokenTypes.Value, 63, 65\n// ]\n```\n","publish_time":1738864576970,"maintainers":[{"name":"florianb","email":"florian.neumann@mindkeeper.solutions"},{"name":"hildjj","email":"joe-github@cursive.net"}],"_cnpm_publish_time":1738864576970,"dist-tags":{"latest":"0.2.3"}}