Socket
Socket
Sign inDemoInstall

@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.3.4 to 2.4.0

18

dompurify/index.d.ts

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

// Type definitions for DOM Purify 2.3
// Type definitions for DOM Purify 2.4
// Project: https://github.com/cure53/DOMPurify

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

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

@@ -31,4 +34,10 @@ sanitize(source: string | Node, config: Config & { RETURN_DOM: true }): HTMLElement;

addHook(hook: 'uponSanitizeElement', cb: (currentNode: Element, data: SanitizeElementHookEvent, config: Config) => void): void;
addHook(hook: 'uponSanitizeAttribute', cb: (currentNode: Element, data: SanitizeAttributeHookEvent, config: Config) => void): void;
addHook(
hook: 'uponSanitizeElement',
cb: (currentNode: Element, data: SanitizeElementHookEvent, config: Config) => void,
): void;
addHook(
hook: 'uponSanitizeAttribute',
cb: (currentNode: Element, data: SanitizeAttributeHookEvent, config: Config) => void,
): void;
addHook(hook: HookName, cb: (currentNode: Element, data: HookEvent, config: Config) => void): void;

@@ -59,2 +68,3 @@

ALLOWED_TAGS?: string[] | undefined;
ALLOWED_NAMESPACES?: string[] | undefined;
ALLOWED_URI_REGEXP?: RegExp | undefined;

@@ -61,0 +71,0 @@ FORBID_ATTR?: string[] | undefined;

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

@@ -45,4 +45,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dompurify",

},
"typesPublisherContentHash": "afe02d731b209893bad88f02ab7a3df2baf1a0c7b74d733943d0d486ffac0fab",
"typeScriptVersion": "4.0"
"typesPublisherContentHash": "628710d5718954ab5d090b6918000baf247dab2e0c775dd203bb49e3e58a9c38",
"typeScriptVersion": "4.1"
}

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

### Additional Details
* Last updated: Wed, 24 Aug 2022 09:02:25 GMT
* Last updated: Fri, 11 Nov 2022 22:32:45 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