{"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.1.1","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"],"gitHead":"365f246526226e905d746e707a80941b0be24e3e","bugs":{"url":"https://github.com/one-ini/core/issues"},"homepage":"https://github.com/one-ini/core#readme","_id":"@one-ini/wasm@0.1.1","_nodeVersion":"18.11.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==","shasum":"6013659736c9dbfccc96e8a9c2b3de317df39323","tarball":"http://registry-npm.ywwl.com/@one-ini/wasm/download/@one-ini/wasm-0.1.1.tgz","fileCount":6,"unpackedSize":97978,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdAnSU5BOsWWTTtnRa686j6Mrp2JRZeiho+sjI9CBKhAIgLt5ppUMN0n3wfAWvXwrbSDOpQHv/sv311Jx68Ftm/Mg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWE3FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnRg/+Maw0NWtvnB1XllP2Xkze95KK1L4W32IfKWvYC7AIK6vJ6vjl\r\ng3CViRhnArLF4+VlrxBdSThlt2SvvpVqnlBUMkUAqb/O6+xLulIAClAEPHvO\r\nuG7ltQKJMCFhJOPhsihzo3II+dxfwuTrrMrtYpIZy3trXdL/f4av2a8zrFca\r\nPIKHp6aOaXRG7s2M9QYX6X7kxz/Bi4yU4p17MlzDaeM7UqNkuZf4diA44bwp\r\nQ1K2WuIg/UimLjtGceBA4z4P5I8cQINjz/0bEtM4sLj2J6undcLYxAIXHbEK\r\nXmwV9MrMcTV0xPPjhpI9e+gDhYf1NpFk6niCWMjcK7bQO7wU1lOLlbpWcHnz\r\nKJd4wvz4oY8zOTHNpsEy3Ny7qjexA2ILQc55qJj3vPT00gQ5Yew00qMUOseT\r\nhKAFRqc9NSNm5L5a+qkayYtRXniFZMGk2oJvqWYBw9D7QkvET4lY6iFNhfOU\r\nSLo7zZfsXvf4ipwtTcUantvXemXESMuCoUaXelbcjgYQK0HcUj/IMlgfujOu\r\nUgXxnBx9MZgtJy0sG2kensoWv+TyoOH0Yujr2ESu5AqYNDDszuhwVVPma783\r\nkpqzSymEsaRrKijC/BptBDjj9nDPJX1PAvxe81GBY5SDJix6t46+uBK+5d86\r\nSgRycH/4eAuOWovCWiEVnQFhCcjI/Sb/qS0=\r\n=+Riw\r\n-----END PGP SIGNATURE-----\r\n","size":36102,"noattachment":false,"key":"/@one-ini/wasm/-/@one-ini/wasm-0.1.1.tgz"},"_npmUser":{"name":"hildjj","email":"joe-github@cursive.net"},"directories":{},"maintainers":[{"name":"hildjj","email":"joe-github@cursive.net"},{"name":"florianb","email":"florian.neumann@mindkeeper.solutions"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wasm_0.1.1_1666731461128_0.5621126144718869"},"_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://editorconfig-specification.readthedocs.io/en/latest/#id3).\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 genereted JS wrapper with either:\n\n```js\nimport { parse_to_json } from './pkg/editorconfig_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":1666731461355,"_cnpm_publish_time":1666731461355,"dist-tags":{"latest":"0.2.3"}}