Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.qname = function (qname) {
exports.name(qname);
const result = xnv.qname(qname);
if (!result.success) {
throw new DOMException(
"\"" + qname + "\" did not match the QName production: " + result.error,
"InvalidCharacterError"
);
}
};
exports.qname = function (qname, core) {
exports.name(qname, core);
try {
xnv.qname(qname);
} catch (e) {
throw new core.DOMException(core.DOMException.NAMESPACE_ERR,
"\"" + qname + "\" did not match the QName production: " + e.message);
}
};
exports.qname = function (qname) {
exports.name(qname);
const result = xnv.qname(qname);
if (!result.success) {
throw new DOMException(
"\"" + qname + "\" did not match the QName production: " + result.error,
"InvalidCharacterError"
);
}
};