{"_id":"@alshdavid/html-lexer","_rev":"7-10c6de1166b4b0ac7d0f488e1f1f2623","name":"@alshdavid/html-lexer","dist-tags":{"latest":"0.0.9"},"versions":{"0.0.1":{"name":"@alshdavid/html-lexer","version":"0.0.1","description":"An HTML5 lexer","type":"module","exports":{".":[{"import":"./lib/index.mjs"}]},"keywords":["html5","compliant","html","lexer","tokeniser","tokenizer","parser","start-tag","end-tag","element","attribute","attribute-name","attribute-value"],"repository":{"type":"git","url":"git+https://github.com/alshdavid/html-lexer.git"},"license":"MIT","devDependencies":{"@types/node":"^20.4.2","typescript":"^5.1.6"},"scripts":{"validate":"npx tsc -p tsconfig.json"},"bugs":{"url":"https://github.com/alshdavid/html-lexer/issues"},"homepage":"https://github.com/alshdavid/html-lexer#readme","_id":"@alshdavid/html-lexer@0.0.1","_integrity":"sha512-wISbYkFGTZcsRHGekUNdmysCYdFLC6xVGcU0ul6hmDXII3ltdj+QKzG0WL1s7IBDE2mNMjxEwMG2KOJaGW3lVw==","_resolved":"C:\\Users\\ALSHDA~1\\AppData\\Local\\Temp\\a59fa072bea57d56fcaa6a656a1fb2fa\\alshdavid-html-lexer-0.0.1.tgz","_from":"file:alshdavid-html-lexer-0.0.1.tgz","_nodeVersion":"20.3.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-wISbYkFGTZcsRHGekUNdmysCYdFLC6xVGcU0ul6hmDXII3ltdj+QKzG0WL1s7IBDE2mNMjxEwMG2KOJaGW3lVw==","shasum":"c69385643ed381dab10085e91d1b18fea0735d27","tarball":"https://registry.npmjs.org/@alshdavid/html-lexer/-/html-lexer-0.0.1.tgz","fileCount":19,"unpackedSize":53095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf+AMrK7YetplIEStUF8PlCw0CxTUHHLEa4zG/YqmQuwIhANIyKfyiSR2TASu7FNVYCdUjnV5cQ8JZNXgpJHm/16zQ"}]},"_npmUser":{"name":"alshdavid","email":"alshdavid@gmail.com"},"directories":{},"maintainers":[{"name":"alshdavid","email":"alshdavid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-lexer_0.0.1_1689414513353_0.12559863145319272"},"_hasShrinkwrap":false},"0.0.2":{"name":"@alshdavid/html-lexer","version":"0.0.2","description":"An HTML5 lexer","type":"module","exports":{".":[{"import":"./lib/index.mjs"}]},"keywords":["html5","compliant","html","lexer","tokeniser","tokenizer","parser","start-tag","end-tag","element","attribute","attribute-name","attribute-value"],"repository":{"type":"git","url":"git+https://github.com/alshdavid/html-lexer.git"},"license":"MIT","devDependencies":{"@types/node":"^20.4.2","prettier":"^3.0.0","typescript":"^5.1.6","yaml":"^2.3.1"},"scripts":{"check-js":"npx tsc -p tsconfig.json","format":"npx prettier --write ./lib/**/* ./tests/**/*.mjs ./tests/**/*.html --list-different","test":"node ./tests/tests.mjs"},"bugs":{"url":"https://github.com/alshdavid/html-lexer/issues"},"homepage":"https://github.com/alshdavid/html-lexer#readme","_id":"@alshdavid/html-lexer@0.0.2","_integrity":"sha512-PGYvP9yIMf/Q4y2aK4nKqxKSaBhFB4D6Y6egksbwO41Pyopu8ylxghd1piKjqttjzypayoWTaoTtSmI9nrltDw==","_resolved":"C:\\Users\\ALSHDA~1\\AppData\\Local\\Temp\\93a804cb0661d6e27a6d60eb00b8d119\\alshdavid-html-lexer-0.0.2.tgz","_from":"file:alshdavid-html-lexer-0.0.2.tgz","_nodeVersion":"20.3.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-PGYvP9yIMf/Q4y2aK4nKqxKSaBhFB4D6Y6egksbwO41Pyopu8ylxghd1piKjqttjzypayoWTaoTtSmI9nrltDw==","shasum":"e54fbba5e287a8f3f418b966635aa1922955fb17","tarball":"https://registry.npmjs.org/@alshdavid/html-lexer/-/html-lexer-0.0.2.tgz","fileCount":26,"unpackedSize":66482,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA4xJm1/drWRpKaxqwMXsQ4gz9/lEUYKLDTf+DlMyOcdAiEAtwlLSTaI0V7wn9sVh/8qiJ15lTsLITDDhNvyQPxCWIM="}]},"_npmUser":{"name":"alshdavid","email":"alshdavid@gmail.com"},"directories":{},"maintainers":[{"name":"alshdavid","email":"alshdavid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-lexer_0.0.2_1689479856495_0.8528838012193272"},"_hasShrinkwrap":false},"0.0.3":{"name":"@alshdavid/html-lexer","version":"0.0.3","description":"An HTML5 lexer","type":"module","exports":{".":[{"import":"./lib/index.mjs"}]},"keywords":["html5","compliant","html","lexer","tokeniser","tokenizer","parser","start-tag","end-tag","element","attribute","attribute-name","attribute-value"],"repository":{"type":"git","url":"git+https://github.com/alshdavid/html-lexer.git"},"license":"MIT","devDependencies":{"@types/node":"^20.4.2","prettier":"^3.0.0","typescript":"^5.1.6","yaml":"^2.3.1"},"scripts":{"check-js":"npx tsc -p tsconfig.json","format":"npx prettier --write ./lib/**/* ./tests/**/*.mjs ./tests/**/*.html --list-different","test":"node ./tests/tests.mjs"},"bugs":{"url":"https://github.com/alshdavid/html-lexer/issues"},"homepage":"https://github.com/alshdavid/html-lexer#readme","_id":"@alshdavid/html-lexer@0.0.3","_integrity":"sha512-UaZshEACJN2NZTAvhTvItsd8jGnYH3tLaRJedqDuDQZtmccOOEKls0CrrEhOAFgWr7aC7hyIJPrM/urSk2Ar8g==","_resolved":"C:\\Users\\ALSHDA~1\\AppData\\Local\\Temp\\d43e725e1f6d2f741c83d0bec8f6e08f\\alshdavid-html-lexer-0.0.3.tgz","_from":"file:alshdavid-html-lexer-0.0.3.tgz","_nodeVersion":"20.3.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-UaZshEACJN2NZTAvhTvItsd8jGnYH3tLaRJedqDuDQZtmccOOEKls0CrrEhOAFgWr7aC7hyIJPrM/urSk2Ar8g==","shasum":"dccba839f79c1f18a278763164d6316a3fabfede","tarball":"https://registry.npmjs.org/@alshdavid/html-lexer/-/html-lexer-0.0.3.tgz","fileCount":26,"unpackedSize":66550,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAg04ood+VmWoAUSHDv6E1KMFJNF0fWt0irzE9Zz200kAiEAl/y13OWIB4B3DObfK/c1w6qWHBgm4/SO4krPIJyxb9A="}]},"_npmUser":{"name":"alshdavid","email":"alshdavid@gmail.com"},"directories":{},"maintainers":[{"name":"alshdavid","email":"alshdavid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-lexer_0.0.3_1689479955156_0.8376070765817036"},"_hasShrinkwrap":false},"0.0.5":{"name":"@alshdavid/html-lexer","version":"0.0.5","description":"An HTML5 lexer","type":"module","exports":{".":[{"import":"./lib/index.mjs","types":"./types/index.d.mts"}],"./legacy":[{"import":"./lib/legacy/index.mjs","types":"./types/legacy/index.d.mts"}]},"keywords":["html5","compliant","html","lexer","tokeniser","tokenizer","parser","start-tag","end-tag","element","attribute","attribute-name","attribute-value"],"repository":{"type":"git","url":"git+https://github.com/alshdavid/html-lexer.git"},"license":"MIT","devDependencies":{"@types/node":"^20.4.2","prettier":"^3.0.0","typescript":"^5.1.6"},"scripts":{"build":"npm run check-js && npm run build-types","check-js":"npx tsc -p tsconfig.json","build-types":"npm run clean && npx tsc -p ./.github/tsconfig.build.json","clean":"node -e \"const fs = require('node:fs'); const p = require('node:path'); fs.existsSync(p.join(__dirname, 'types')) && fs.rmSync(p.join(__dirname, 'types'), { recursive: true })\"","format":"npx prettier --write ./lib/**/* ./tests/**/*.mjs ./tests/**/*.html --list-different","test":"node ./tests/tests.mjs"},"bugs":{"url":"https://github.com/alshdavid/html-lexer/issues"},"homepage":"https://github.com/alshdavid/html-lexer#readme","_id":"@alshdavid/html-lexer@0.0.5","_integrity":"sha512-4hKo1AghaT8BxQ2H7TQISm1aUKwhwV8+/+mkW4XML2WkfKtoehNzRWC2KSFhcJp6QMJYHCPpm1s0V+m9YT832g==","_resolved":"C:\\Users\\ALSHDA~1\\AppData\\Local\\Temp\\18dc04641806e25d059859bea4b34836\\alshdavid-html-lexer-0.0.5.tgz","_from":"file:alshdavid-html-lexer-0.0.5.tgz","_nodeVersion":"20.3.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-4hKo1AghaT8BxQ2H7TQISm1aUKwhwV8+/+mkW4XML2WkfKtoehNzRWC2KSFhcJp6QMJYHCPpm1s0V+m9YT832g==","shasum":"b82e32ef19e5e75dfeab09e0a1a144fa78f885a6","tarball":"https://registry.npmjs.org/@alshdavid/html-lexer/-/html-lexer-0.0.5.tgz","fileCount":26,"unpackedSize":67030,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzHjSBeTkf5jAg4LAyjankoFoqLD627zxvFtGlhHojTwIgWKhevZ1+V0h8Hvg/dNPgNIxd132CMfyxi4D06RGRiXU="}]},"_npmUser":{"name":"alshdavid","email":"alshdavid@gmail.com"},"directories":{},"maintainers":[{"name":"alshdavid","email":"alshdavid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-lexer_0.0.5_1689481958556_0.8494300692767378"},"_hasShrinkwrap":false},"0.0.6":{"name":"@alshdavid/html-lexer","version":"0.0.6","description":"An HTML5 lexer","exports":{".":[{"import":"./esm/index.js","require":"./cjs/index.js","types":"./types/index.d.ts"}]},"keywords":["html5","compliant","html","lexer","tokeniser","tokenizer","parser","start-tag","end-tag","element","attribute","attribute-name","attribute-value"],"repository":{"type":"git","url":"git+https://github.com/alshdavid/html-lexer.git"},"license":"MIT","devDependencies":{"@types/node":"^20.4.2","esbuild":"^0.18.13","esbuild-register":"^3.4.2","prettier":"^3.0.0","typescript":"^5.1.6"},"dependencies":{"ts-node":"^10.9.1"},"scripts":{"build":"npm run build:esm && npm run build:cjs && npm run build:types","build:esm":"npm run clean:esm && npx tsc -p ./.github/tsconfig.esm.json && echo \"{\\\"type\\\":\\\"module\\\"}\" > ./esm/package.json","build:cjs":"npm run clean:cjs && npx tsc -p ./.github/tsconfig.cjs.json && echo \"{\\\"type\\\":\\\"commonjs\\\"}\" > ./cjs/package.json","build:types":"npm run clean:types && npx tsc -p ./.github/tsconfig.types.json","clean":"npm run clean:esm && npm run clean:cjs && npm run clean:types","clean:esm":"node ./.github/clean.mjs esm","clean:cjs":"node ./.github/clean.mjs cjs","clean:types":"node ./.github/clean.mjs types","format":"npx prettier --write ./lib/**/* ./tests/**/*.mjs ./tests/**/*.html --list-different","test":"ts-node --loader esbuild-register/loader -r esbuild-register ./tests/tests.ts"},"bugs":{"url":"https://github.com/alshdavid/html-lexer/issues"},"homepage":"https://github.com/alshdavid/html-lexer#readme","_id":"@alshdavid/html-lexer@0.0.6","_integrity":"sha512-6JgB5hk6fIAIsLbqEV42axPx18wE5Nnyo524/BswfBjXqZJeaA20SvGnJ5su4AOn88djTwQMB4vaTcT9b2/AUw==","_resolved":"/private/var/folders/tj/fc_6ycyn1m1f8vnwy2qy_rw80000gn/T/d32d16b2b0dedce806f06ba1f14f9b60/alshdavid-html-lexer-0.0.6.tgz","_from":"file:alshdavid-html-lexer-0.0.6.tgz","_nodeVersion":"20.4.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-6JgB5hk6fIAIsLbqEV42axPx18wE5Nnyo524/BswfBjXqZJeaA20SvGnJ5su4AOn88djTwQMB4vaTcT9b2/AUw==","shasum":"aad0eb89872d55daaa5f382c4ac2ac21a7093405","tarball":"https://registry.npmjs.org/@alshdavid/html-lexer/-/html-lexer-0.0.6.tgz","fileCount":68,"unpackedSize":100977,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdoao2hj7VhI97EXcR33q5XUfAgOqKBFRbaqOD4mPUowIhAOZ/RbBD33X3i7FckKkqw/xmHUE1/i1tmadRXSNFs9Qi"}]},"_npmUser":{"name":"alshdavid","email":"alshdavid@gmail.com"},"directories":{},"maintainers":[{"name":"alshdavid","email":"alshdavid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-lexer_0.0.6_1689494809233_0.5167117750185324"},"_hasShrinkwrap":false},"0.0.7":{"name":"@alshdavid/html-lexer","version":"0.0.7","description":"An HTML5 lexer","exports":{".":[{"import":"./esm/index.js","require":"./cjs/index.js","types":"./types/index.d.ts"}]},"keywords":["html5","compliant","html","lexer","tokeniser","tokenizer","parser","start-tag","end-tag","element","attribute","attribute-name","attribute-value"],"repository":{"type":"git","url":"git+https://github.com/alshdavid/html-lexer.git"},"license":"MIT","devDependencies":{"@types/node":"^20.4.2","prettier":"^3.0.0","typescript":"^5.1.6"},"scripts":{"build":"npm run build:esm && npm run build:cjs && npm run build:types","build:esm":"npm run clean:esm && npx tsc -p ./.github/tsconfig.esm.json && echo \"{\\\"type\\\":\\\"module\\\"}\" > ./esm/package.json","build:cjs":"npm run clean:cjs && npx tsc -p ./.github/tsconfig.cjs.json && echo \"{\\\"type\\\":\\\"commonjs\\\"}\" > ./cjs/package.json","build:types":"npm run clean:types && npx tsc -p ./.github/tsconfig.types.json","clean":"npm run clean:esm && npm run clean:cjs && npm run clean:types","clean:esm":"node ./.github/clean.mjs esm","clean:cjs":"node ./.github/clean.mjs cjs","clean:types":"node ./.github/clean.mjs types","format":"npx prettier --write ./lib/**/* ./tests/**/*.mjs ./tests/**/*.html --list-different","test":"ts-node --loader esbuild-register/loader -r esbuild-register ./tests/tests.ts"},"bugs":{"url":"https://github.com/alshdavid/html-lexer/issues"},"homepage":"https://github.com/alshdavid/html-lexer#readme","_id":"@alshdavid/html-lexer@0.0.7","_integrity":"sha512-Kg90iaQBive4Dq0YcNujeQ7p5puhgG1RAnup21idmjagjhSafMibQ3pxvqirBDxJ/C8Hx83JuvLpFyQweGPwQQ==","_resolved":"/private/var/folders/tj/fc_6ycyn1m1f8vnwy2qy_rw80000gn/T/5501a52b3d1b2bf3c0fa4ba7bfd168e8/alshdavid-html-lexer-0.0.7.tgz","_from":"file:alshdavid-html-lexer-0.0.7.tgz","_nodeVersion":"20.4.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-Kg90iaQBive4Dq0YcNujeQ7p5puhgG1RAnup21idmjagjhSafMibQ3pxvqirBDxJ/C8Hx83JuvLpFyQweGPwQQ==","shasum":"eecefd7f7e58843429f6ca67668982561af6ef71","tarball":"https://registry.npmjs.org/@alshdavid/html-lexer/-/html-lexer-0.0.7.tgz","fileCount":68,"unpackedSize":100866,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDJ9fmroJHRz8aRza+8oWYsFqpJoxTIN4w06ByEkK+arAiEA8uLYhH1+pdU9+ujaotAyJYI8hzlU6azh3GfJE/Bn9d4="}]},"_npmUser":{"name":"alshdavid","email":"alshdavid@gmail.com"},"directories":{},"maintainers":[{"name":"alshdavid","email":"alshdavid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-lexer_0.0.7_1689494955596_0.7509357622892647"},"_hasShrinkwrap":false},"0.0.8":{"name":"@alshdavid/html-lexer","version":"0.0.8","description":"An HTML5 lexer","exports":{".":[{"import":"./esm/index.js","require":"./cjs/index.js","types":"./types/index.d.ts"}]},"keywords":["html5","compliant","html","lexer","tokeniser","tokenizer","parser","start-tag","end-tag","element","attribute","attribute-name","attribute-value"],"repository":{"type":"git","url":"git+https://github.com/alshdavid/html-lexer.git"},"license":"MIT","devDependencies":{"@types/node":"^20.4.2","esbuild":"^0.18.13","esbuild-register":"^3.4.2","prettier":"^3.0.0","typescript":"^5.1.6"},"scripts":{"build":"npm run build:esm && npm run build:cjs && npm run build:types","build:esm":"npm run clean:esm && npx tsc -p ./.github/tsconfig.esm.json && echo \"{\\\"type\\\":\\\"module\\\"}\" > ./esm/package.json","build:cjs":"npm run clean:cjs && npx tsc -p ./.github/tsconfig.cjs.json && echo \"{\\\"type\\\":\\\"commonjs\\\"}\" > ./cjs/package.json","build:types":"npm run clean:types && npx tsc -p ./.github/tsconfig.types.json","clean":"npm run clean:esm && npm run clean:cjs && npm run clean:types","clean:esm":"node ./.github/clean.mjs esm","clean:cjs":"node ./.github/clean.mjs cjs","clean:types":"node ./.github/clean.mjs types","format":"npx prettier --write ./lib/**/* ./tests/**/*.mjs ./tests/**/*.html --list-different","test":"node -r esbuild-register ./tests/tests.ts"},"bugs":{"url":"https://github.com/alshdavid/html-lexer/issues"},"homepage":"https://github.com/alshdavid/html-lexer#readme","_id":"@alshdavid/html-lexer@0.0.8","_integrity":"sha512-cYQp8MB68F9HwF4kKqymi2L2XfF7lkmrlt3udEmBN8HbI2py94Hz25GbFrOB1crPFJ/o0Nra+IkYNYwmrrGc3Q==","_resolved":"/private/var/folders/tj/fc_6ycyn1m1f8vnwy2qy_rw80000gn/T/3b26df072dcba6b96c70bbab3da97dc6/alshdavid-html-lexer-0.0.8.tgz","_from":"file:alshdavid-html-lexer-0.0.8.tgz","_nodeVersion":"20.4.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-cYQp8MB68F9HwF4kKqymi2L2XfF7lkmrlt3udEmBN8HbI2py94Hz25GbFrOB1crPFJ/o0Nra+IkYNYwmrrGc3Q==","shasum":"c47f33d8e192025bd6c9be0c8a599ac1faf6b7ab","tarball":"https://registry.npmjs.org/@alshdavid/html-lexer/-/html-lexer-0.0.8.tgz","fileCount":68,"unpackedSize":100021,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDy+6piI2gVb4FL1T11V0rO/krmpVnLysb/HH7AlpHvJQIhAIuyGYgHSQhQYHciJP/y4R8XTEvR6a2Vfa8TLk98jsR2"}]},"_npmUser":{"name":"alshdavid","email":"alshdavid@gmail.com"},"directories":{},"maintainers":[{"name":"alshdavid","email":"alshdavid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-lexer_0.0.8_1689499583933_0.7323834589080436"},"_hasShrinkwrap":false},"0.0.9":{"name":"@alshdavid/html-lexer","version":"0.0.9","description":"An HTML5 lexer","exports":{".":[{"import":"./esm/index.js","require":"./cjs/index.js","types":"./types/index.d.ts"}]},"keywords":["html5","compliant","html","lexer","tokeniser","tokenizer","parser","start-tag","end-tag","element","attribute","attribute-name","attribute-value"],"repository":{"type":"git","url":"git+https://github.com/alshdavid/html-lexer.git"},"license":"MIT","devDependencies":{"@types/node":"^20.4.2","esbuild":"^0.18.13","esbuild-register":"^3.4.2","prettier":"^3.0.0","typescript":"^5.1.6"},"scripts":{"build":"npm run build:esm && npm run build:cjs && npm run build:types","build:esm":"npm run clean:esm && npx tsc -p ./.github/tsconfig.esm.json && echo \"{\\\"type\\\":\\\"module\\\"}\" > ./esm/package.json","build:cjs":"npm run clean:cjs && npx tsc -p ./.github/tsconfig.cjs.json && echo \"{\\\"type\\\":\\\"commonjs\\\"}\" > ./cjs/package.json","build:types":"npm run clean:types && npx tsc -p ./.github/tsconfig.types.json","clean":"npm run clean:esm && npm run clean:cjs && npm run clean:types","clean:esm":"node ./.github/clean.mjs esm","clean:cjs":"node ./.github/clean.mjs cjs","clean:types":"node ./.github/clean.mjs types","format":"npx prettier --write ./src/**/*.ts ./tests/**/*.ts ./tests/**/*.html --list-different","test":"node -r esbuild-register ./tests/tests.ts"},"bugs":{"url":"https://github.com/alshdavid/html-lexer/issues"},"homepage":"https://github.com/alshdavid/html-lexer#readme","_id":"@alshdavid/html-lexer@0.0.9","_integrity":"sha512-lQk5ZgVHd/dngOKuNAulyeidhpIOy7uQRZzFWsxx/rY7xKBtggTK9Ek9t01RhZkh8F7IO8ltW8NOw/o7ZMbFKA==","_resolved":"/private/var/folders/tj/fc_6ycyn1m1f8vnwy2qy_rw80000gn/T/beb69a970b4bb659c2b73e4d6d95d9e3/alshdavid-html-lexer-0.0.9.tgz","_from":"file:alshdavid-html-lexer-0.0.9.tgz","_nodeVersion":"20.4.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-lQk5ZgVHd/dngOKuNAulyeidhpIOy7uQRZzFWsxx/rY7xKBtggTK9Ek9t01RhZkh8F7IO8ltW8NOw/o7ZMbFKA==","shasum":"f52541e1643cf8add20e4b24417f3d06edf42c3f","tarball":"https://registry.npmjs.org/@alshdavid/html-lexer/-/html-lexer-0.0.9.tgz","fileCount":83,"unpackedSize":128713,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBf0QidGxNAkN1VU7GvOc2D0PQk31RCmCZ1NtsAqyI/AAiBc58OgqTJmN1+ccp5J0/a2WUkcW9TptSkoCjg8vtVQJw=="}]},"_npmUser":{"name":"alshdavid","email":"alshdavid@gmail.com"},"directories":{},"maintainers":[{"name":"alshdavid","email":"alshdavid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/html-lexer_0.0.9_1689548132071_0.8823825008428303"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-15T09:48:33.264Z","0.0.1":"2023-07-15T09:48:33.534Z","modified":"2023-07-16T22:55:32.430Z","0.0.2":"2023-07-16T03:57:36.653Z","0.0.3":"2023-07-16T03:59:15.347Z","0.0.5":"2023-07-16T04:32:38.771Z","0.0.6":"2023-07-16T08:06:49.453Z","0.0.7":"2023-07-16T08:09:15.841Z","0.0.8":"2023-07-16T09:26:24.203Z","0.0.9":"2023-07-16T22:55:32.251Z"},"maintainers":[{"name":"alshdavid","email":"alshdavid@gmail.com"}],"description":"An HTML5 lexer","homepage":"https://github.com/alshdavid/html-lexer#readme","keywords":["html5","compliant","html","lexer","tokeniser","tokenizer","parser","start-tag","end-tag","element","attribute","attribute-name","attribute-value"],"repository":{"type":"git","url":"git+https://github.com/alshdavid/html-lexer.git"},"bugs":{"url":"https://github.com/alshdavid/html-lexer/issues"},"license":"MIT","readme":"# An HTML5 lexer for safe template languages\n\n[![NPM version][npm-image]][npm-url]\n\n[npm-image]: https://img.shields.io/npm/v/@alshdavid/html-lexer.svg\n[npm-url]: https://npmjs.org/package/@alshdavid/html-lexer\n\nA standard compliant, incremental/ streaming HTML5 lexer.\n\nThis is an HTML5 lexer designed to be used a basis for safe and HTML-context\naware template languages, IDEs or syntax highlighters. It is different from the\nother available tokenizers in that it preserves all the information of the\ninput string, e.g. formatting, quotation style and other idiosyncrasies. It\ndoes so by producing annotated chunks of the input string rather than the\nslightly more high level tokens that are described in the specification.\nHowever, it does do so in a manner that is compatible with the language defined\nin the [HTML5 specification][1].\n\n[1]: https://html.spec.whatwg.org/multipage/syntax.html#tokenization\n\nThe main motivation for this project is a jarring absence of safe HTML\ntemplate languages. By safe, I mean that the template placeholders are typed\naccording to their context, and that the template engine ensures that the\nstrings that come to fill the placeholders are automatically and\ncorrectly escaped to yield valid HTML.\n\n## Usage\n\nThe produced tokens are simply tuples (arrays) `[type, chunk]` of a token type\nand a chunk of the input string.\n\n### Basic usage\n\n```javascript\nimport { Lexer } from \"@alshdavid/html-lexer\"\n\nconst result = Lexer.tokenize(\"<h1>Hello, World</h1>\")\n```\n\n### Chunked usage\n\nThe lexer has a ‘push parser’ API. Writes are listened to using the subscribable method `onWrite`, returning an unsubscribe function.\n\nExample:\n\n```javascript\nimport { Lexer } from \"@alshdavid/html-lexer\"\n\n// Create lexer\nconst lexer = new Lexer()\n\n// Stream tokens synchronously as they are parsed\nlexer.onWrite((token) => console.log(token))\nlexer.onEnd(() => console.log(\"Job's done\"))\n\n// Write tokens\nlexer.write(\"<h1>Hello, World</h1>\")\n\n// Closes lexer, no more writes can occur\nlexer.end()\n```\n### Results\n\nBoth of the examples will create an output that looks like this:\n\n```javascript\n[\"startTagStart\", \"<\"]\n[\"tagName\", \"h1\"]\n[\"tagEnd\", \">\"]\n[\"data\", \"Hello,\"]\n[\"space\", \" \"]\n[\"data\", \"World\"]\n[\"endTagStart\", \"</\"]\n[\"tagName\", \"h1\"]\n[\"tagEnd\", \">\"]\n```\n\nThe lexer is incremental: `onWrite` will be called as soon as a token is\navailable and you can split the input across multiple writes:\n\n```javascript\nconst lexer = new Lexer()\n\nlexer.onWrite((token) => console.log(token))\n\nlexer.write(\"<h\")\nlexer.write(\"1>Hello, W\")\nlexer.write(\"orld</h1>\")\n\nlexer.end()\n```\n\n## Token types\n\nThe tokens emitted are simple tuples `[type, chunk]`.\nThe type of a token is just a string, and it is one of:\n\n- `attributeAssign`\n- `attributeName`\n- `attributeValueData`\n- `attributeValueEnd`\n- `attributeValueStart`\n- `bogusCharRef`\n- `charRefDecimal`\n- `charRefHex`\n- `charRefLegacy`\n- `charRefNamed`\n- `commentData`\n- `commentEndBogus`\n- `commentEnd`\n- `commentStartBogus`\n- `commentStart`\n- `data`\n- `endTagStart`\n- `lessThanSign`\n- `uncodedAmpersand`\n- `newline`\n- `nulls`\n- `plaintext`\n- `rawtext`\n- `rcdata`\n- `space`\n- `startTagStart`\n- `tagEndAutoclose`\n- `tagEnd`\n- `tagName`\n- `tagSpace`\n\nThe `uncodedAmpersand` is emitted for ampersand `&` characters that _do not_ start a character reference.\n\nThe `tagSpace` is emitted for 'space' between attributes in\nelement tags.\n\nOtherwise the names should be self explanatory.\n\n## Limitations\n\n- Doctype  \n  The lexer still interprets doctypes as 'bogus comments'.\n\n- CDATA  \n  The lexer interprets CDATA sections as 'bogus comments'.  \n  (CDATA is only allowed in foreign content - svg and mathml.)\n\n- Script tags  \n  The lexer interprets script tags as rawtext elements.\n  This has no dire consequences, other than that html begin and\n  end comment tags that may surround it, are not marked as such.\n\n## License\n\nThe source code for this project is licensed under the _Mozilla Public License Version 2.0_, copyright Alwin Blok 2016–2018, 2020–2021, 2023.\n","readmeFilename":"README.md"}