New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/domhandler

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/domhandler - npm Package Compare versions

Comparing version 2.4.5 to 3.1.0

27

domhandler/package.json
{
"name": "@types/domhandler",
"version": "2.4.5",
"description": "TypeScript definitions for domhandler",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler",
"version": "3.1.0",
"description": "Stub TypeScript definitions entry for domhandler, which provides its own types definitions",
"main": "",
"scripts": {},
"license": "MIT",
"contributors": [
{
"name": "Johan Davidsson",
"githubUsername": "johandavidson",
"url": "https://github.com/johandavidson"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/domhandler"
"dependencies": {
"domhandler": "*"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "60a0dea4ceaa8d3a2845f5b3a5f65cca135472055a4143248af267f9fd234f68",
"typeScriptVersion": "4.5"
"deprecated": "This is a stub types definition. domhandler provides its own type definitions, so you do not need this installed."
}

@@ -1,92 +0,3 @@

# Installation
> `npm install --save @types/domhandler`
This is a stub types definition for @types/domhandler (https://github.com/fb55/domhandler#readme).
# Summary
This package contains type definitions for domhandler (https://github.com/fb55/DomHandler#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/domhandler/index.d.ts)
````ts
export interface DomHandlerOptions {
/***
* Indicates whether the whitespace in text nodes should be normalized
* (= all whitespace should be replaced with single spaces). The default value is "false".
*/
normalizeWhitespace?: boolean | undefined;
/***
* Adds DOM level 1 properties to all elements.
*/
withDomLvl1?: boolean | undefined;
/***
* Indicates whether a startIndex property will be added to nodes.
* When the parser is used in a non-streaming fashion, startIndex is an integer
* indicating the position of the start of the node in the document.
* The default value is "false".
*/
withStartIndices?: boolean | undefined;
/***
* Indicates whether a endIndex property will be added to nodes.
* When the parser is used in a non-streaming fashion, endIndex is an integer
* indicating the position of the end of the node in the document.
* The default value is "false".
*/
withEndIndices?: boolean | undefined;
}
export interface DomElement {
attribs?: { [s: string]: string } | undefined;
children?: DomElement[] | undefined;
data?: any;
name?: string | undefined;
next?: DomElement | undefined;
parent?: DomElement | undefined;
prev?: DomElement | undefined;
type?: string | undefined;
}
export interface Element extends DomElement {
name: string;
}
export interface Node extends DomElement {
readonly firstChild: DomElement;
readonly lastChild: DomElement;
readonly nodeType: number;
}
export class DomHandler {
constructor(callback: (error: any, dom: DomElement[]) => any, options?: DomHandlerOptions);
onparserinit(parser: any): void;
/***
* Resets the handler back to starting state
*/
onreset(): void;
/***
* Signals the handler that parsing is done
*/
onend(): void;
onerror(error: Error): void;
onclosetag(): void;
onopentag(name: string, attribs: { [s: string]: string }): void;
ontext(data: string): void;
oncomment(data: string): void;
oncdatastart(): void;
oncommentend(): void;
onprocessinginstruction(name: string, data: string): void;
}
````
### Additional Details
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT
* Dependencies: none
# Credits
These definitions were written by [Johan Davidsson](https://github.com/johandavidson).
domhandler provides its own type definitions, so you don't need @types/domhandler installed!
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc