Socket
Socket
Sign inDemoInstall

@contrast/patcher

Package Overview
Dependencies
Maintainers
17
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrast/patcher - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

28

lib/index.d.ts

@@ -0,1 +1,16 @@

/*
* Copyright: 2022 Contrast Security, Inc
* Contact: support@contrastsecurity.com
* License: Commercial
* NOTICE: This Software and the patented inventions embodied within may only be
* used as part of Contrast Security’s commercial offerings. Even though it is
* made available through public repositories, use of this Software is subject to
* the applicable End User Licensing Agreement found at
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
* between Contrast Security and the End User. The Software may not be reverse
* engineered, modified, repackaged, sold, redistributed or otherwise used in a
* way not consistent with the End User License Agreement.
*/
import { Core } from '@contrast/core';

@@ -5,9 +20,10 @@

export interface Patcher {
patch: () => void,
patch: (obj: function | class | { [key: string]: any }, prop: string, options: { name: string,
patchType: string, pre?: function, around?: function, post?: function }) => function | class | { [key: string]: any },
resetInstrumentation: () => void,
unpatch: () => void,
unwrap: () => void
isContrastHooked: () => void
hookedFunctionToString: () => void
hookedFunctions: () => void
unpatch: (fn: function, funcName: string, patchType: string) => void,
unwrap: (fn: function) => function
isContrastHooked: (fn: function) => boolean
hookedFunctionToString: (fn: function) => string
hookedFunctions: WeakMap<K<function>, V<{ fn: function }>>
}

@@ -14,0 +30,0 @@

@@ -0,1 +1,16 @@

/*
* Copyright: 2022 Contrast Security, Inc
* Contact: support@contrastsecurity.com
* License: Commercial
* NOTICE: This Software and the patented inventions embodied within may only be
* used as part of Contrast Security’s commercial offerings. Even though it is
* made available through public repositories, use of this Software is subject to
* the applicable End User Licensing Agreement found at
* https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
* between Contrast Security and the End User. The Software may not be reverse
* engineered, modified, repackaged, sold, redistributed or otherwise used in a
* way not consistent with the End User License Agreement.
*/
'use strict';

@@ -132,2 +147,3 @@

hooked,
orig: fn,
funcKey,

@@ -134,0 +150,0 @@ obj: new.target || this,

{
"name": "@contrast/patcher",
"version": "1.0.2",
"version": "1.0.3",
"description": "Advanced monkey patching--registers hooks to run in and around functions",

@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE",

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