{"name":"xml-name-validator","description":"Validates whether a string matches the production for an XML name or qualified name","keywords":["xml","name","qname"],"version":"4.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":"mocha","lint":"eslint ."},"devDependencies":{"@domenic/eslint-config":"^1.4.0","benchmark":"^2.1.4","eslint":"^7.32.0","mocha":"^9.1.1"},"engines":{"node":">=12"},"gitHead":"6b0e370056299556c01ca9300256b10f80800549","bugs":{"url":"https://github.com/jsdom/xml-name-validator/issues"},"homepage":"https://github.com/jsdom/xml-name-validator#readme","_id":"xml-name-validator@4.0.0","_nodeVersion":"16.9.1","_npmVersion":"7.21.1","dist":{"integrity":"sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==","shasum":"79a006e2e63149a8600f15430f0a4725d1524835","tarball":"http://registry-npm.ywwl.com/xml-name-validator/download/xml-name-validator-4.0.0.tgz","fileCount":4,"unpackedSize":13545,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICgGMG620vrdMrmO0YET+L0UUEaKunJRNRyXnhD1/vv+AiEAuMI7Uqv8QUD0/ZQ6xj+Cn+zBrgS7Rx+71mXkTdU+hWQ="}],"size":4692,"noattachment":false,"key":"/xml-name-validator/-/xml-name-validator-4.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_4.0.0_1632002502156_0.8019144968342102"},"_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":1632002502293,"_cnpm_publish_time":1632002502293,"dist-tags":{"latest":"5.0.0"}}