File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
lib/node_modules/@stdlib/proxy/ctor/lib Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 4747*/
4848
4949// eslint-disable-next-line stdlib/jsdoc-doctest-marker
50+ /**
51+ * A polyfill for the Proxy function.
52+ *
53+ * This function is a placeholder for the Proxy functionality and is intended to be replaced by
54+ * a proper implementation of a Proxy. It is used to demonstrate how a Proxy can be used to intercept
55+ * interactions with an object.
56+ *
57+ * @param {Object } target - The target object to wrap with the Proxy.
58+ * @returns {Object } The target object (polyfill implementation in this case).
59+ *
60+ * @example
61+ * var handler = {
62+ * get: function(target, prop) {
63+ * return prop in target ? target[prop] : 42;
64+ * }
65+ * };
66+ *
67+ * var p = new Proxy({}, handler);
68+ * console.log(p.a); // 42
69+ */
5070function Proxy ( target ) {
5171 // eslint-disable-next-line no-warning-comments
5272 // TODO: polyfill implementation
5373 return target ;
54- // eslint-enable require-jsdoc
5574}
5675
5776
You can’t perform that action at this time.
0 commit comments