domhandler
Advanced tools
Comparing version 4.3.0 to 4.3.1
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
import { ElementType } from "domelementtype"; | ||
interface SourceCodeLocation { | ||
/** One-based line index of the first character. */ | ||
startLine: number; | ||
/** One-based column index of the first character. */ | ||
startCol: number; | ||
/** Zero-based first character index. */ | ||
startOffset: number; | ||
/** One-based line index of the last character. */ | ||
endLine: number; | ||
/** One-based column index of the last character. Points directly *after* the last character. */ | ||
endCol: number; | ||
/** Zero-based last character index. Points directly *after* the last character. */ | ||
endOffset: number; | ||
} | ||
interface TagSourceCodeLocation extends SourceCodeLocation { | ||
startTag?: SourceCodeLocation; | ||
endTag?: SourceCodeLocation; | ||
} | ||
/** | ||
@@ -23,10 +41,3 @@ * This object will be used as the prototype for Nodes when creating a | ||
*/ | ||
sourceCodeLocation?: { | ||
startOffset: number; | ||
endOffset: number; | ||
startLine: number; | ||
endLine: number; | ||
startColumn: number; | ||
endColumn: number; | ||
}; | ||
sourceCodeLocation?: SourceCodeLocation | null; | ||
/** | ||
@@ -165,2 +176,8 @@ * | ||
/** | ||
* `parse5` source code location info, with start & end tags. | ||
* | ||
* Available if parsing with parse5 and location info is enabled. | ||
*/ | ||
sourceCodeLocation?: TagSourceCodeLocation | null; | ||
/** | ||
* Same as {@link name}. | ||
@@ -167,0 +184,0 @@ * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. |
{ | ||
"name": "domhandler", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "Handler for htmlparser2 that turns pages into a dom", | ||
@@ -39,13 +39,13 @@ "author": "Felix Boehm <me@feedic.com>", | ||
"devDependencies": { | ||
"@types/jest": "^27.0.3", | ||
"@types/node": "^16.11.11", | ||
"@typescript-eslint/eslint-plugin": "^5.5.0", | ||
"@typescript-eslint/parser": "^5.5.0", | ||
"eslint": "^8.3.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"@types/jest": "^27.4.1", | ||
"@types/node": "^17.0.21", | ||
"@typescript-eslint/eslint-plugin": "^5.15.0", | ||
"@typescript-eslint/parser": "^5.15.0", | ||
"eslint": "^8.11.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"htmlparser2": "^7.2.0", | ||
"jest": "^27.4.2", | ||
"prettier": "^2.5.0", | ||
"ts-jest": "^27.0.7", | ||
"typescript": "^4.5.2" | ||
"jest": "^27.5.1", | ||
"prettier": "^2.6.0", | ||
"ts-jest": "^27.1.3", | ||
"typescript": "^4.6.2" | ||
}, | ||
@@ -52,0 +52,0 @@ "jest": { |
Sorry, the diff of this file is not supported yet
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
44583
941