{"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.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"],"gitHead":"9abe6a6f43ae09fea2fa630b520e8a603a8d586f","bugs":{"url":"https://github.com/one-ini/core/issues"},"homepage":"https://github.com/one-ini/core#readme","_id":"@one-ini/wasm@0.1.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.4","dist":{"integrity":"sha512-cP8ZX+YBxw7SykvcX1NNKSia7ByE+PQTLZcRcEuuHsGJL+Zzuid+LSU1gC6QS1Ll3GTdE7z1/+JR5MYeMQkLBQ==","shasum":"9afb7db5804f509490de695481cf05a00aef9ccd","tarball":"http://registry-npm.ywwl.com/@one-ini/wasm/download/@one-ini/wasm-0.1.0.tgz","fileCount":6,"unpackedSize":96136,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIECZ1G83EkubyKNPrF4NwK6K9yiTVVmJg8kTElS2TlKFAiAn+3xP29Z28t2I2IQNwmHobbEo4kUto+OrzBquHbFTnw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPvP3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8Tw//QJaD5xY5k28aWuK5GVn/ISDNlxSutkeBeJgxC3no4oNO7FgX\r\nWcKu/XIMnyBYYq4FT4vyvudto/WFL/u6aijXhzJho3s++nLxXhAB/TwBvhsf\r\nqci0UDiSmfU2mP6+u1CypAsDxdzxqVPprFMqT4Mi2YzV36SjyZJ0ZQvQYEgE\r\nrKKEz/hoilIkU9q+c9FwfDY1AFWxymrveAIdeYHFySYa6GhvxU6gKguiTH2s\r\nn4b7KV5BeAHSprWMpdUDMCECHpcQ2Dh+4CXWOkucyoeZ1rhejhDe0PRWDsm7\r\nP07vGcxYImGirCFEva3msegASFEuw2UAO8jBeeQBqTOKcF8Z0OfzBLnyw+GN\r\niEf+mRoYVgNEvrkrbQbWZEnhGFNitKDzWkf3YJ91YLyVaGHCO1xC8tpvT9SI\r\nSGzckY/PAgxE6OVQQRtW7aRtqJFfxwcSpVp/dPLRi+I6OSKc/oCc8pzb3L4Q\r\nzUjns5jMaOkAzmyyHwDgiSV5KexdWdf5kRRnMQrUXy34KG12yuKzwRiqijqz\r\ng1G50sRTeyivIxO7zz0Rjxz/GEFLFbPwtB5HXWfuQ71SsP7R9KD2OfNlMZJ+\r\nd3xRrlCN3jWJiOnSZh9XiLxyFjF6SuFHuamP5KLVr6dcnSZEo91Miqw2pZ+2\r\nU6m/QnJSarLecM4SKVkPxdMuZrDLsfd4tKk=\r\n=db7d\r\n-----END PGP SIGNATURE-----\r\n","size":35654,"noattachment":false,"key":"/@one-ini/wasm/-/@one-ini/wasm-0.1.0.tgz"},"_npmUser":{"name":"florianb","email":"florian.neumann@mindkeeper.solutions"},"directories":{},"maintainers":[{"name":"florianb","email":"florian.neumann@mindkeeper.solutions"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wasm_0.1.0_1665070071044_0.7700108477201733"},"_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":1665070071223,"_cnpm_publish_time":1665070071223,"dist-tags":{"latest":"0.2.3"}}