{"name":"xml-name-validator","description":"Validates whether a string matches the production for an XML name or qualified name","keywords":["xml","name","qname"],"version":"5.0.0","author":{"name":"Domenic Denicola","email":"d@domenic.me","url":"https://domenic.me/"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/jsdom/xml-name-validator.git"},"main":"lib/xml-name-validator.js","scripts":{"test":"node --test","benchmark":"node scripts/benchmark.js","lint":"eslint ."},"devDependencies":{"@domenic/eslint-config":"^3.0.0","benchmark":"^2.1.4","eslint":"^8.53.0"},"engines":{"node":">=18"},"_id":"xml-name-validator@5.0.0","gitHead":"836f307eec81279d2b1655587892e38a1effe039","bugs":{"url":"https://github.com/jsdom/xml-name-validator/issues"},"homepage":"https://github.com/jsdom/xml-name-validator#readme","_nodeVersion":"21.1.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==","shasum":"82be9b957f7afdacf961e5980f1bf227c0bf7673","tarball":"http://registry-npm.ywwl.com/xml-name-validator/download/xml-name-validator-5.0.0.tgz","fileCount":4,"unpackedSize":13574,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFLZ1eC1pNLglk7HSDKZaoNZhDb136x5+Mb13I6EpD4aAiAo4SGBqzx8oxERLUEU/yMRfPaz2m1MZzH289FI7RTN6w=="}],"size":4678,"noattachment":false,"key":"/xml-name-validator/-/xml-name-validator-5.0.0.tgz"},"_npmUser":{"name":"domenic","email":"d@domenic.me"},"directories":{},"maintainers":[{"name":"timothygu","email":"timothygu99@gmail.com"},{"name":"domenic","email":"d@domenic.me"},{"name":"sebmaster","email":"sebmaster16@gmail.com"},{"name":"zirro","email":"code@zirro.se"},{"name":"tmpvar","email":"tmpvar@gmail.com"},{"name":"joris-van-der-wel","email":"joris@jorisvanderwel.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xml-name-validator_5.0.0_1699767489708_0.3976051766574984"},"_hasShrinkwrap":false,"readme":"# Validate XML Names and Qualified Names\n\nThis package simply tells you whether or not a string matches the [`Name`](http://www.w3.org/TR/xml/#NT-Name) or [`QName`](http://www.w3.org/TR/xml-names/#NT-QName) productions in the XML Namespaces specification. We use it for implementing the [validate](https://dom.spec.whatwg.org/#validate) algorithm in jsdom, but you can use it for whatever you want.\n\n## Usage\n\nThis package's main module exports two functions, `name()` and `qname()`. Both take a string and return a boolean indicating whether or not the string matches the relevant production.\n\n```js\n\"use strict\":\nconst xnv = require(\"xml-name-validator\");\n\n// Will return true\nxnv.name(\"x\");\nxnv.name(\":\");\nxnv.name(\"a:0\");\nxnv.name(\"a:b:c\");\n\n// Will return false\nxnv.name(\"\\\\\");\nxnv.name(\"'\");\nxnv.name(\"0\");\nxnv.name(\"a!\");\n\n// Will return true\nxnv.qname(\"x\");\nxnv.qname(\"a0\");\nxnv.qname(\"a:b\");\n\n// Will return false\nxnv.qname(\":a\");\nxnv.qname(\":b\");\nxnv.qname(\"a:b:c\");\nxnv.qname(\"a:0\");\n```\n","publish_time":1699767489927,"_cnpm_publish_time":1699767489927,"dist-tags":{"latest":"5.0.0"}}