{"name":"xml-name-validator","description":"Validates whether a string matches the production for an XML name or qualified name","keywords":["xml","name","qname"],"version":"3.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","files":["lib/"],"scripts":{"prepublish":"node scripts/generate-grammar.js < lib/grammar.pegjs > lib/generated-parser.js","pretest":"npm run prepublish","test":"mocha","lint":"eslint ."},"devDependencies":{"eslint":"^2.9.0","mocha":"^2.4.5","waka":"0.1.2"},"gitHead":"f2bbf6ffee851b95381cd98053d777ab47419697","bugs":{"url":"https://github.com/jsdom/xml-name-validator/issues"},"homepage":"https://github.com/jsdom/xml-name-validator#readme","_id":"xml-name-validator@3.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.6.0","_npmUser":{"name":"domenic","email":"d@domenic.me"},"dist":{"integrity":"sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==","shasum":"6ae73e06de4d8c6e47f9fb181f78d648ad457c6a","tarball":"http://registry-npm.ywwl.com/xml-name-validator/download/xml-name-validator-3.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqmo5AzRd4MinM7cZhlCHp04/acMCKForhwwQ3mSFsVAiEAlkA87ZvPJlqY/HqSYQXX3/fZhZkYiKjyIEO71H4K648="}],"size":6691,"noattachment":false,"key":"/xml-name-validator/-/xml-name-validator-3.0.0.tgz"},"maintainers":[{"name":"domenic","email":"domenic@domenicdenicola.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xml-name-validator-3.0.0.tgz_1508717316935_0.215595209505409"},"directories":{},"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":1508717317874,"_cnpm_publish_time":1508717317874,"dist-tags":{"latest":"5.0.0"}}