{"maintainers":[{"name":"domenic","email":"domenic@domenicdenicola.com"}],"keywords":["xml","name","qname"],"dist-tags":{"latest":"2.0.1"},"author":{"name":"Domenic Denicola","email":"d@domenic.me","url":"https://domenic.me/"},"description":"Validates whether a string matches the production for an XML name or qualified name","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's default export takes a string and will return an object of the form `{ success, error }`, where `success` is a boolean and if it is `false`, then `error` is a string containing some hint as to where the match went wrong.\n\n```js\n\"use strict\":\nvar xnv = require(\"xml-name-validator\");\nvar assert = require(\"assert\");\n\n// Will return { success: true, error: undefined }\nxnv.name(\"x\");\nxnv.name(\":\");\nxnv.name(\"a:0\");\nxnv.name(\"a:b:c\");\n\n// Will return { success: false, error: <an explanatory string> }\nxnv.name(\"\\\\\");\nxnv.name(\"'\");\nxnv.name(\"0\");\nxnv.name(\"a!\");\n\n// Will return { success: true, error: undefined }\nxnv.qname(\"x\");\nxnv.qname(\"a0\");\nxnv.qname(\"a:b\");\n\n// Will return { success: false, error: <an explanatory string> }\nxnv.qname(\":a\");\nxnv.qname(\":b\");\nxnv.qname(\"a:b:c\");\nxnv.qname(\"a:0\");\n```\n","repository":{"type":"git","url":"https://github.com/jsdom/xml-name-validator"},"bugs":{"url":"https://github.com/jsdom/xml-name-validator/issues"},"license":"WTFPL","versions":{"1.0.0":{"name":"xml-name-validator","description":"Validates whether a string matches the production for an XML name or qualified name","keywords":["xml","name","qname"],"version":"1.0.0","author":{"name":"Domenic Denicola","email":"d@domenic.me","url":"https://domenic.me/"},"license":"WTFPL","repository":{"type":"git","url":"https://github.com/jsdom/xml-name-validator"},"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":"jshint lib && jscs lib"},"devDependencies":{"jscs":"^1.8.1","jshint":"^2.5.10","mocha":"^2.0.1","pegjs":"0.8.0"},"gitHead":"f73d690f98a1ac8b5e323bffc7fabd2478db711e","bugs":{"url":"https://github.com/jsdom/xml-name-validator/issues"},"homepage":"https://github.com/jsdom/xml-name-validator","_id":"xml-name-validator@1.0.0","_shasum":"dcf82ee092322951ef8cc1ba596c9cbfd14a83f1","_from":".","_npmVersion":"2.1.2","_nodeVersion":"0.10.33","_npmUser":{"name":"domenic","email":"domenic@domenicdenicola.com"},"maintainers":[{"name":"domenic","email":"domenic@domenicdenicola.com"}],"dist":{"shasum":"dcf82ee092322951ef8cc1ba596c9cbfd14a83f1","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/xml-name-validator/-/xml-name-validator-1.0.0.tgz"},"directories":{}},"2.0.1":{"name":"xml-name-validator","description":"Validates whether a string matches the production for an XML name or qualified name","keywords":["xml","name","qname"],"version":"2.0.1","author":{"name":"Domenic Denicola","email":"d@domenic.me","url":"https://domenic.me/"},"license":"WTFPL","repository":{"type":"git","url":"https://github.com/jsdom/xml-name-validator"},"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":"jshint lib && jscs lib"},"devDependencies":{"jscs":"^1.8.1","jshint":"^2.5.10","mocha":"^2.0.1","waka":"0.1.2"},"gitHead":"48a7d8094fd6245e603121be4b3adb4475650748","bugs":{"url":"https://github.com/jsdom/xml-name-validator/issues"},"homepage":"https://github.com/jsdom/xml-name-validator","_id":"xml-name-validator@2.0.1","_shasum":"4d8b8f1eccd3419aa362061becef515e1e559635","_from":".","_npmVersion":"2.5.1","_nodeVersion":"1.3.0","_npmUser":{"name":"domenic","email":"domenic@domenicdenicola.com"},"maintainers":[{"name":"domenic","email":"domenic@domenicdenicola.com"}],"dist":{"shasum":"4d8b8f1eccd3419aa362061becef515e1e559635","tarball":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/xml-name-validator/-/xml-name-validator-2.0.1.tgz"},"directories":{}}},"name":"xml-name-validator","time":{"modified":"2015-02-24T18:09:59.382Z","created":"2014-12-28T03:59:50.159Z","1.0.0":"2014-12-28T03:59:50.159Z","2.0.0":"2015-02-22T19:43:07.909Z","2.0.1":"2015-02-24T18:09:59.382Z"},"readmeFilename":"README.md","homepage":"https://github.com/jsdom/xml-name-validator"}