Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/dom-parser

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/dom-parser - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

dom-parser/index.d.ts

@@ -51,3 +51,3 @@ // Type definitions for dom-parser 0.1

ELEMENT_NODE = 1,
TEXT_NODE = 3
TEXT_NODE = 3,
}

@@ -54,0 +54,0 @@ }

{
"name": "@types/dom-parser",
"version": "0.1.1",
"version": "0.1.2",
"description": "TypeScript definitions for dom-parser",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dom-parser",
"license": "MIT",

@@ -22,4 +23,4 @@ "contributors": [

"dependencies": {},
"typesPublisherContentHash": "cc4d64a455224253131616dc2a047c4d87134bc59649c10427ca52fc05ba677f",
"typeScriptVersion": "3.3"
"typesPublisherContentHash": "61682b9fadee26d32ab87e0f8c68c54ca291e3410b4ea757db31611e287d5368",
"typeScriptVersion": "4.5"
}

@@ -9,5 +9,64 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dom-parser.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dom-parser/index.d.ts)
````ts
// Type definitions for dom-parser 0.1
// Project: https://github.com/ershov-konst/dom-parser#readme
// Definitions by: Guy Bidkar <https://github.com/gbidkar>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare class DomParser {
constructor();
parseFromString(html: string): DomParser.Dom;
}
declare namespace DomParser {
interface Dom extends DOMSearchable {
getElementsByClassName(className: string): Node[] | null;
getElementsByTagName(tagName: string): Node[] | null;
getElementsByName(name: string): Node[] | null;
getElementById(id: string): Node | null;
getElementsByAttribute(attr: string, value: string): Node[] | null;
}
interface Node extends DOMSearchable {
nodeType: NodeType;
nodeName: string;
childNodes: Node[];
firstChild: Node | null;
lastChild: Node | null;
parentNode: Node | null;
attributes: string[];
innerHTML: string;
outerHTML: string;
textContent: string;
getElementsByClassName(className: string): Node[] | null;
getElementsByTagName(tagName: string): Node[] | null;
getElementsByName(name: string): Node[] | null;
getElementById(id: string): Node | null;
getAttribute(name: string): string | null;
}
interface DOMSearchable {
getElementsByClassName(className: string): Node[] | null;
getElementsByTagName(tagName: string): Node[] | null;
getElementsByName(name: string): Node[] | null;
getElementById(id: string): Node | null;
}
enum NodeType {
ELEMENT_NODE = 1,
TEXT_NODE = 3,
}
}
export = DomParser;
````
### Additional Details
* Last updated: Mon, 30 Nov 2020 05:00:28 GMT
* Last updated: Fri, 22 Sep 2023 20:29:40 GMT
* Dependencies: none

@@ -14,0 +73,0 @@ * Global values: none

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