{"name":"@one-ini/wasm","version":"0.1.3","keywords":["editorconfig","ini","parser","ast"],"license":"MIT","_id":"@one-ini/wasm@0.1.3","homepage":"https://github.com/one-ini/core#readme","bugs":{"url":"https://github.com/one-ini/core/issues"},"dist":{"shasum":"b597c3cb881bd3c034e566666dfed6a9065c7401","tarball":"http://registry-npm.ywwl.com/@one-ini/wasm/download/@one-ini/wasm-0.1.3.tgz","fileCount":6,"integrity":"sha512-S8I6rV3EpvE7V+CMloRAPtGTZ01mGkCb0WG7mOxUXnDr26fFPB86z9VbIvfkTIIy4RPlwI9IFS/LdibLyHDjuA==","signatures":[{"sig":"MEYCIQC3SiJ/dWnFGBByOekoON++U/Ktx4kO9C8+nMzQ/5rHfAIhAI2GGhAsN3lzYKJCcYDGQmPkNDGDWKBni3TxPFtV9fdA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@one-ini%2fwasm@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":111259,"size":42673,"noattachment":false,"key":"/@one-ini/wasm/-/@one-ini/wasm-0.1.3.tgz"},"main":"one_ini.js","types":"one_ini.d.ts","gitHead":"9c24987d1b4e4acf492ed74c5e9645b7a44fd275","_npmUser":{"name":"hildjj","email":"joe-github@cursive.net"},"repository":{"url":"git+https://github.com/one-ini/core.git","type":"git"},"_npmVersion":"10.9.2","description":"Parse EditorConfig-INI file contents into AST","directories":{},"_nodeVersion":"22.13.1","collaborators":["Jed Mao <jedmao@outlook.com>","Joe Hildebrand <joe-github@cursive.net>","Florian Neumann <florian.neumann@mindkeeper.solutions>"],"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/wasm_0.1.3_1738797654803_0.37745060463489843","host":"s3://npm-registry-packages-npm-production"},"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":1738797655026,"maintainers":[{"name":"florianb","email":"florian.neumann@mindkeeper.solutions"},{"name":"hildjj","email":"joe-github@cursive.net"}],"_cnpm_publish_time":1738797655026,"dist-tags":{"latest":"0.2.3"}}