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
38
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 0.0.32 to 0.0.33

47

dompurify/index.d.ts

@@ -5,24 +5,35 @@ // Type definitions for DOM Purify

// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace DOMPurify;
export = DOMPurify;
export declare let version: string;
export declare let removed: any[];
export declare let isSupported: boolean;
declare const DOMPurify: createDOMPurifyI
export declare function sanitize(source: string | Node): string;
export declare function sanitize(source: string | Node, config: Config & { RETURN_DOM_FRAGMENT?: false; RETURN_DOM?: false; }): string;
export declare function sanitize(source: string | Node, config: Config & { RETURN_DOM_FRAGMENT: true; }): DocumentFragment;
export declare function sanitize(source: string | Node, config: Config & { RETURN_DOM: true; }): HTMLElement;
export declare function sanitize(source: string | Node, config: Config): string | HTMLElement | DocumentFragment;
export declare function addHook(hook: 'uponSanitizeElement', cb: (currentNode: Element, data: SanitizeElementHookEvent, config: Config) => void): void;
export declare function addHook(hook: 'uponSanitizeAttribute', cb: (currentNode: Element, data: SanitizeAttributeHookEvent, config: Config) => void): void;
export declare function addHook(hook: HookName, cb: (currentNode: Element, data: HookEvent, config: Config) => void): void;
export declare function setConfig(cfg: Config): void;
export declare function clearConfig(): void;
export declare function isValidAttribute(tag: string, attr: string, value: string): boolean;
export declare function removeHook(entryPoint: HookName): void;
export declare function removeHooks(entryPoint: HookName): void;
export declare function removeAllHooks(): void;
interface createDOMPurifyI extends DOMPurifyI {
(window?: Window): DOMPurifyI
}
interface DOMPurifyI {
sanitize(source: string | Node): string
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
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
setConfig(cfg: Config): void
clearConfig(): void
isValidAttribute(tag: string, attr: string, value: string): boolean
removeHook(entryPoint: HookName): void
removeHooks(entryPoint: HookName): void
removeAllHooks(): void
version: string
removed: any[]
isSupported: boolean
}
interface Config {

@@ -29,0 +40,0 @@ ADD_ATTR?: string[];

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

@@ -23,11 +23,12 @@ "license": "MIT",

"main": "",
"types": "",
"types": "index",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git"
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/dompurify"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "99e8f941f128e4caeebfd53d4da5d89c2149dd456eaff54c220989d9648c9d54",
"typesPublisherContentHash": "f282f970270c9c0e58ffe70c5d324c59b8697fe927dec252bba9a22e529d21a5",
"typeScriptVersion": "2.0"
}

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

Additional Details
* Last updated: Thu, 01 Nov 2018 21:34:13 GMT
* Last updated: Tue, 02 Jul 2019 17:19:10 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: DOMPurify

# Credits
These definitions were written by Dave Taylor <http://davetayls.me>, Samira Bazuzi <https://github.com/bazuzi>, FlowCrypt <https://github.com/FlowCrypt>.
These definitions were written by Dave Taylor <http://davetayls.me>, Samira Bazuzi <https://github.com/bazuzi>, and FlowCrypt <https://github.com/FlowCrypt>.
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