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

@tapjs/intercept

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tapjs/intercept - npm Package Compare versions

Comparing version 0.0.0-4 to 0.0.0-5

18

dist/cjs/index.d.ts

@@ -149,2 +149,6 @@ import { TapPlugin, TestBase } from '@tapjs/core';

};
/**
* Implementation class providing the {@link Interceptor#intercept},
* {@link Interceptor#capture}, and {@link Interceptor#captureFn} methods.
*/
export declare class Interceptor {

@@ -154,3 +158,9 @@ #private;

/**
* Intercept and track object property sets and gets
* Intercept and track object property sets and gets.
*
* If a PropertyDescriptor is set, then it will be used as the replacement
* value. Otherwise, the original descriptor will be used.
*
* If the `strictMode` param is set, then attempts to write to read-only
* properties will throw an error.
*/

@@ -178,2 +188,5 @@ intercept<T extends object>(obj: T, prop: keyof T, desc?: PropertyDescriptor, strictMode?: boolean): InterceptResultsMethod;

* The results hang off the function as the 'calls' property.
*
* The added `fn.args()` method will return an array of the arguments
* passed to each call since the last time it was inspected.
*/

@@ -185,3 +198,6 @@ captureFn<F extends (this: any, ...a: any[]) => any>(original: F): ((...a: any[]) => any) & {

}
/**
* plugin method that instantiates an {@link Interceptor}
*/
export declare const plugin: TapPlugin<Interceptor>;
//# sourceMappingURL=index.d.ts.map

@@ -6,2 +6,6 @@ "use strict";

const stack_1 = require("@tapjs/stack");
/**
* Implementation class providing the {@link Interceptor#intercept},
* {@link Interceptor#capture}, and {@link Interceptor#captureFn} methods.
*/
class Interceptor {

@@ -13,3 +17,9 @@ #t;

/**
* Intercept and track object property sets and gets
* Intercept and track object property sets and gets.
*
* If a PropertyDescriptor is set, then it will be used as the replacement
* value. Otherwise, the original descriptor will be used.
*
* If the `strictMode` param is set, then attempts to write to read-only
* properties will throw an error.
*/

@@ -192,2 +202,5 @@ intercept(obj, prop, desc, strictMode = true) {

* The results hang off the function as the 'calls' property.
*
* The added `fn.args()` method will return an array of the arguments
* passed to each call since the last time it was inspected.
*/

@@ -221,4 +234,7 @@ captureFn(original) {

exports.Interceptor = Interceptor;
/**
* plugin method that instantiates an {@link Interceptor}
*/
const plugin = t => new Interceptor(t);
exports.plugin = plugin;
//# sourceMappingURL=index.js.map

@@ -149,2 +149,6 @@ import { TapPlugin, TestBase } from '@tapjs/core';

};
/**
* Implementation class providing the {@link Interceptor#intercept},
* {@link Interceptor#capture}, and {@link Interceptor#captureFn} methods.
*/
export declare class Interceptor {

@@ -154,3 +158,9 @@ #private;

/**
* Intercept and track object property sets and gets
* Intercept and track object property sets and gets.
*
* If a PropertyDescriptor is set, then it will be used as the replacement
* value. Otherwise, the original descriptor will be used.
*
* If the `strictMode` param is set, then attempts to write to read-only
* properties will throw an error.
*/

@@ -178,2 +188,5 @@ intercept<T extends object>(obj: T, prop: keyof T, desc?: PropertyDescriptor, strictMode?: boolean): InterceptResultsMethod;

* The results hang off the function as the 'calls' property.
*
* The added `fn.args()` method will return an array of the arguments
* passed to each call since the last time it was inspected.
*/

@@ -185,3 +198,6 @@ captureFn<F extends (this: any, ...a: any[]) => any>(original: F): ((...a: any[]) => any) & {

}
/**
* plugin method that instantiates an {@link Interceptor}
*/
export declare const plugin: TapPlugin<Interceptor>;
//# sourceMappingURL=index.d.ts.map
import { plugin as TeardownPlugin } from '@tapjs/after';
import { at, captureString } from '@tapjs/stack';
/**
* Implementation class providing the {@link Interceptor#intercept},
* {@link Interceptor#capture}, and {@link Interceptor#captureFn} methods.
*/
export class Interceptor {

@@ -9,3 +13,9 @@ #t;

/**
* Intercept and track object property sets and gets
* Intercept and track object property sets and gets.
*
* If a PropertyDescriptor is set, then it will be used as the replacement
* value. Otherwise, the original descriptor will be used.
*
* If the `strictMode` param is set, then attempts to write to read-only
* properties will throw an error.
*/

@@ -188,2 +198,5 @@ intercept(obj, prop, desc, strictMode = true) {

* The results hang off the function as the 'calls' property.
*
* The added `fn.args()` method will return an array of the arguments
* passed to each call since the last time it was inspected.
*/

@@ -216,3 +229,6 @@ captureFn(original) {

}
/**
* plugin method that instantiates an {@link Interceptor}
*/
export const plugin = t => new Interceptor(t);
//# sourceMappingURL=index.js.map

6

package.json
{
"name": "@tapjs/intercept",
"version": "0.0.0-4",
"version": "0.0.0-5",
"description": "a built-in tap extension for t.intercept() and t.capture()",

@@ -47,6 +47,6 @@ "main": "./dist/cjs/index.js",

"peerDependencies": {
"@tapjs/core": "0.0.0-4"
"@tapjs/core": "0.0.0-5"
},
"dependencies": {
"@tapjs/after": "0.0.0-4",
"@tapjs/after": "0.0.0-5",
"@tapjs/stack": "0.0.0-2"

@@ -53,0 +53,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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