Socket
Socket
Sign inDemoInstall

@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-20 to 0.0.0-21

14

dist/cjs/index.js

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

const stack_1 = require("@tapjs/stack");
const notConfig = (m, property, caller) => {
const s = typeof property === 'string'
? `'${property}'`
: property.toString();
const er = new Error(`Cannot ${m} ${s}, defined {configurable:false}`);
Error.captureStackTrace(er, caller);
return er;
};
/**

@@ -39,2 +47,5 @@ * Implementation class providing the

}
if (orig && !orig.configurable) {
throw notConfig('intercept property', prop, this.#t.t.intercept);
}
let restore;

@@ -167,2 +178,5 @@ // if we have an original, then that serves as the basis for

const prop = Object.getOwnPropertyDescriptor(obj, method);
if (prop && !prop.configurable) {
throw notConfig('capture method', method, this.#t.t.capture);
}
// if we don't have a prop we can restore by just deleting

@@ -169,0 +183,0 @@ // otherwise, we restore by putting it back as it was

import { plugin as TeardownPlugin } from '@tapjs/after';
import { at, captureString } from '@tapjs/stack';
const notConfig = (m, property, caller) => {
const s = typeof property === 'string'
? `'${property}'`
: property.toString();
const er = new Error(`Cannot ${m} ${s}, defined {configurable:false}`);
Error.captureStackTrace(er, caller);
return er;
};
/**

@@ -35,2 +43,5 @@ * Implementation class providing the

}
if (orig && !orig.configurable) {
throw notConfig('intercept property', prop, this.#t.t.intercept);
}
let restore;

@@ -163,2 +174,5 @@ // if we have an original, then that serves as the basis for

const prop = Object.getOwnPropertyDescriptor(obj, method);
if (prop && !prop.configurable) {
throw notConfig('capture method', method, this.#t.t.capture);
}
// if we don't have a prop we can restore by just deleting

@@ -165,0 +179,0 @@ // otherwise, we restore by putting it back as it was

11

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

@@ -34,2 +34,5 @@ "type": "module",

},
"tap": {
"typecheck": false
},
"keywords": [

@@ -45,7 +48,7 @@ "tapjs plugin"

"peerDependencies": {
"@tapjs/core": "0.0.0-20"
"@tapjs/core": "0.0.0-21"
},
"dependencies": {
"@tapjs/after": "0.0.0-20",
"@tapjs/stack": "0.0.0-6"
"@tapjs/after": "0.0.0-21",
"@tapjs/stack": "0.0.0-7"
},

@@ -52,0 +55,0 @@ "engines": {

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