You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-12
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# recursive-proxy-mock
2
2
3
-
[](https://www.npmjs.com/package/recursive-proxy-mock)[](https://github.com/CreativeTechGuy/recursive-proxy-mock/blob/main/LICENSE)[](https://www.npmjs.com/package/recursive-proxy-mock)[](https://www.npmjs.com/package/recursive-proxy-mock)[](https://github.com/semantic-release/semantic-release)
3
+
[](https://www.npmjs.com/package/recursive-proxy-mock)[](https://github.com/CreativeTechGuy/recursive-proxy-mock/blob/main/LICENSE)[](https://www.npmjs.com/package/recursive-proxy-mock)[](https://bundlephobia.com/package/recursive-proxy-mock)[](https://www.npmjs.com/package/recursive-proxy-mock)[](https://github.com/semantic-release/semantic-release)
4
4
5
5
> Create a proxy which can mock any object, function, class, etc. with infinite depth and combinations.
@@ -226,15 +226,6 @@ Function to get details about every time a path was visited. Useful in conjuncti
226
226
227
227
-`proxy` - the root proxy object that was returned from `recursiveProxyMock`
228
228
-`path` - see the [ProxyPath section](#proxypath) for more details.
229
-
230
-
### `replayMock(proxy, target)`
231
-
232
-
Replay every operation performed on a proxy mock object onto a target object. This can effectively let you time travel to queue up any actions and replay them as many times as you would like. Every property accessor, every function call, etc will be replayed onto the target.
233
-
234
-
-`proxy` - the root proxy object that was returned from `recursiveProxyMock`
235
-
236
-
-`target` - any object/function/class etc which will be operated on in the same way that the `proxy` object was.
237
-
238
229
- Returns: Array of `ProxyData` objects, one for each time the path was visited on the proxy object. `null` if it was never visited.
239
230
240
231
#### ProxyData
@@ -254,6 +245,13 @@ A `ProxyData` object contains any relevant details about the operation. For exam
254
245
- All other handlers:
255
246
- No useful additional information is available
256
247
248
+
### `replayProxy(proxy, target)`
249
+
250
+
Replay every operation performed on a proxy mock object onto a target object. This can effectively let you time travel to queue up any actions and replay them as many times as you would like. Every property accessor, every function call, etc will be replayed onto the target.
251
+
252
+
-`proxy` - the root proxy object that was returned from `recursiveProxyMock`
253
+
-`target` - any object/function/class etc which will be operated on in the same way that the `proxy` object was.
A debug function which lists the raw "proxy stack" of every operation that was performed on the mock. This is an array of [ProxyData](#proxydata) objects which have metadata that is used to power all of the other functions. For example, every object has a `parent` property which contains a number. This number will be the same as some other object's `self` property. Using those two values you can construct a tree containing every path that was accessed on the object.
Out of the box we support all browsers that support the [Proxy object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#browser_compatibility)and any current LTS version of Node. Unfortunately Proxy cannot be polyfilled for older versions so this is the best browser support we can do.
333
+
Out of the box we support all modern browsers and any currently maintained version of Node. Unfortunately Proxy cannot be polyfilled, so supporting a browser like Internet Explorer is completely out of the question.
0 commit comments