@asamuzakjp/dom-selector
Advanced tools
Comparing version 0.19.5 to 0.19.6
@@ -27,19 +27,19 @@ { | ||
"devDependencies": { | ||
"@types/css-tree": "^2.3.1", | ||
"@types/css-tree": "^2.3.2", | ||
"benchmark": "^2.1.4", | ||
"c8": "^8.0.0", | ||
"chai": "^4.3.7", | ||
"c8": "^8.0.1", | ||
"chai": "^4.3.8", | ||
"css2xpath": "^0.0.3", | ||
"eslint": "^8.45.0", | ||
"eslint": "^8.50.0", | ||
"eslint-config-standard": "^17.1.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-jsdoc": "^46.4.4", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-jsdoc": "^46.8.2", | ||
"eslint-plugin-regexp": "^1.15.0", | ||
"eslint-plugin-unicorn": "^48.0.0", | ||
"eslint-plugin-unicorn": "^48.0.1", | ||
"jsdom": "^22.1.0", | ||
"linkedom": "^0.15.1", | ||
"linkedom": "^0.15.3", | ||
"mocha": "^10.2.0", | ||
"nwsapi": "^2.2.7", | ||
"sinon": "^15.2.0", | ||
"typescript": "^5.1.6" | ||
"sinon": "^16.0.0", | ||
"typescript": "^5.2.2" | ||
}, | ||
@@ -53,3 +53,3 @@ "scripts": { | ||
}, | ||
"version": "0.19.5" | ||
"version": "0.19.6" | ||
} |
@@ -11,2 +11,3 @@ /** | ||
export const IDENTIFIER = 'Identifier'; | ||
export const NOT_SUPPORTED_ERR = 'NotSupportedError'; | ||
export const NTH = 'Nth'; | ||
@@ -19,2 +20,3 @@ export const PSEUDO_CLASS_SELECTOR = 'PseudoClassSelector'; | ||
export const STRING = 'String'; | ||
export const SYNTAX_ERR = 'SyntaxError'; | ||
export const TYPE_SELECTOR = 'TypeSelector'; |
@@ -9,3 +9,3 @@ /** | ||
/* constants */ | ||
import { PSEUDO_CLASS_SELECTOR, SELECTOR } from './constant.js'; | ||
import { PSEUDO_CLASS_SELECTOR, SELECTOR, SYNTAX_ERR } from './constant.js'; | ||
const CODE_POINT_UNIT = parseInt('10000', 16); | ||
@@ -58,3 +58,3 @@ const HEX = 16; | ||
} else { | ||
throw new DOMException(`invalid selector ${selector}`, 'SyntaxError'); | ||
throw new DOMException(`invalid selector ${selector}`, SYNTAX_ERR); | ||
} | ||
@@ -73,3 +73,3 @@ return selector; | ||
if (selector === '' || /^\s*>/.test(selector) || /,\s*$/.test(selector)) { | ||
throw new DOMException(`invalid selector ${selector}`, 'SyntaxError'); | ||
throw new DOMException(`invalid selector ${selector}`, SYNTAX_ERR); | ||
} | ||
@@ -89,3 +89,3 @@ let res; | ||
} else { | ||
throw new DOMException(e.message, 'SyntaxError'); | ||
throw new DOMException(e.message, SYNTAX_ERR); | ||
} | ||
@@ -92,0 +92,0 @@ } |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
88217
2720