You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

proxify-method

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxify-method - npm Package Compare versions

Comparing version
0.0.5
to
0.0.7
+10
-2
package.json
{
"name": "proxify-method",
"version": "0.0.5",
"description": "",
"version": "0.0.7",
"description": "Project for flexible extension of the existing functionality",
"main": "built/index.js",

@@ -20,2 +20,9 @@ "scripts": {

},
"keywords": [
"proxy object",
"proxify",
"flexible extension",
"extension",
"proxy method"
],
"homepage": "https://github.com/Simple-Automation-Testing/api-framework#readme",

@@ -28,2 +35,3 @@ "devDependencies": {

"@typescript-eslint/parser": "^3.8.0",
"assertior": "0.0.9",
"chai": "^4.2.0",

@@ -30,0 +38,0 @@ "eslint": "^7.6.0",

@@ -10,7 +10,8 @@

[ts example](/example/example.ts)
[js example](#js)
[ts example chainProxify](/example/example.ts)
[js example chainProxify](#js)
#### js
## chainProxify usage
```js

@@ -74,1 +75,25 @@ // example with node-fetch and chai

```
## proxify usage
```ts
import {proxify} from 'proxify-method';
const obj = {a: 2, b: 3, c: 4};
function isPropExists(prop, value, targetObj) {
expect(targetObj[prop]).toEqual(value);
}
const proxedObj = proxify(obj, {isPropExists: isPropExists});
const {a, b, c} = proxedObj
.isPropExists('a', 2)
.isPropExists('b', 3)
.isPropExists('c', 4);
expect(a).toEqual(obj.a);
expect(b).toEqual(obj.b);
expect(c).toEqual(obj.c);
expect(proxedObj).toDeepEqual(obj);
```