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

@types/dompurify

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/dompurify - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

26

dompurify/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for DOM Purify 2.1
// Type definitions for DOM Purify 2.2
// Project: https://github.com/cure53/DOMPurify

@@ -23,6 +23,6 @@ // Definitions by: Dave Taylor https://github.com/davetayls

sanitize(source: string | Node): string;
sanitize(source: string | Node, config: Config & { RETURN_TRUSTED_TYPE: true, }): TrustedHTML;
sanitize(source: string | Node, config: Config & { RETURN_DOM_FRAGMENT?: false, RETURN_DOM?: false, }): string;
sanitize(source: string | Node, config: Config & { RETURN_DOM_FRAGMENT: true, }): DocumentFragment;
sanitize(source: string | Node, config: Config & { RETURN_DOM: true, }): HTMLElement;
sanitize(source: string | Node, config: Config & { RETURN_TRUSTED_TYPE: true }): TrustedHTML;
sanitize(source: string | Node, config: Config & { RETURN_DOM_FRAGMENT?: false; RETURN_DOM?: false }): string;
sanitize(source: string | Node, config: Config & { RETURN_DOM_FRAGMENT: true }): DocumentFragment;
sanitize(source: string | Node, config: Config & { RETURN_DOM: true }): HTMLElement;
sanitize(source: string | Node, config: Config): string | HTMLElement | DocumentFragment;

@@ -60,2 +60,7 @@

RETURN_DOM_FRAGMENT?: boolean;
/**
* This defaults to `true` starting DOMPurify 2.2.0. Note that setting it to `false`
* might cause XSS from attacks hidden in closed shadowroots in case the browser
* supports Declarative Shadow: DOM https://web.dev/declarative-shadow-dom/
*/
RETURN_DOM_IMPORT?: boolean;

@@ -68,8 +73,8 @@ RETURN_TRUSTED_TYPE?: boolean;

ALLOW_UNKNOWN_PROTOCOLS?: boolean;
USE_PROFILES?: false | { mathMl?: boolean, svg?: boolean, svgFilters?: boolean, html?: boolean };
USE_PROFILES?: false | { mathMl?: boolean; svg?: boolean; svgFilters?: boolean; html?: boolean };
IN_PLACE?: boolean;
}
type HookName
= 'beforeSanitizeElements'
type HookName =
| 'beforeSanitizeElements'
| 'uponSanitizeElement'

@@ -84,6 +89,3 @@ | 'afterSanitizeElements'

type HookEvent
= SanitizeElementHookEvent
| SanitizeAttributeHookEvent
| null;
type HookEvent = SanitizeElementHookEvent | SanitizeAttributeHookEvent | null;

@@ -90,0 +92,0 @@ interface SanitizeElementHookEvent {

{
"name": "@types/dompurify",
"version": "2.1.0",
"version": "2.2.0",
"description": "TypeScript definitions for DOM Purify",

@@ -39,4 +39,4 @@ "license": "MIT",

},
"typesPublisherContentHash": "8e4abfc91a39df8ac1c6afc1fe1976c71149894c91214aa14308a46e1dd9b8b1",
"typesPublisherContentHash": "e183c15d581ddc1269a71f256208b73b875c46732e3fdf332d95d832341bdc86",
"typeScriptVersion": "3.3"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Wed, 23 Dec 2020 22:05:20 GMT
* Last updated: Mon, 04 Jan 2021 20:50:17 GMT
* Dependencies: [@types/trusted-types](https://npmjs.com/package/@types/trusted-types)

@@ -14,0 +14,0 @@ * Global values: `DOMPurify`

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