{"id":20675339,"url":"https://github.com/jsrei/js-deep-proxy","last_synced_at":"2025-08-23T02:38:15.722Z","repository":{"id":134071149,"uuid":"560243796","full_name":"JSREI/js-deep-proxy","owner":"JSREI","description":"JS的递归Proxy实现","archived":false,"fork":false,"pushed_at":"2022-11-01T17:19:47.000Z","size":3,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T19:47:43.223Z","etag":null,"topics":["deep-proxy","hook","javascript","js-reverse-development"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JSREI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-01T03:24:26.000Z","updated_at":"2025-03-13T06:49:16.000Z","dependencies_parsed_at":"2024-07-15T13:20:52.697Z","dependency_job_id":null,"html_url":"https://github.com/JSREI/js-deep-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JSREI/js-deep-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSREI%2Fjs-deep-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSREI%2Fjs-deep-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSREI%2Fjs-deep-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSREI%2Fjs-deep-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JSREI","download_url":"https://codeload.github.com/JSREI/js-deep-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSREI%2Fjs-deep-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271732973,"owners_count":24811441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-proxy","hook","javascript","js-reverse-development"],"created_at":"2024-11-16T21:09:15.249Z","updated_at":"2025-08-23T02:38:15.670Z","avatar_url":"https://github.com/JSREI.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript Deep Proxy\n\n# 一、简介\n\n对JavaScript原生的Proxy的扩展，增加递归Proxy的功能。 \n\n## 何为Deep Proxy\n\nJavaScript原生的Proxy只能代理传入的对象的直接属性，但对于属性的属性则代理不到，比如：\n\n```json\n{\n    \"a\": {\n        \"b\": \"xxx\"\n    }\n}\n```\n\n对于上面的对象，使用原生的Proxy能够代理到a属性，但是代理不到a属性上的b属性，这个库就是解决这个问题的，能够·从a一直代理到任意层级的属性。 \n\n# 二、Example\n\n```js\nconst {deepProxy} = require(\"./main\");\n\n(() =\u003e {\n\n    const fuck = {\n        \"name\": \"CC11001100\",\n        \"skill\": [\n            {\n                \"name\": \"eat\",\n                \"level\": 100,\n            },\n            {\n                \"name\": \"drunk\",\n                \"level\": 100,\n            },\n            {\n                \"name\": \"sleep\",\n                \"level\": 99,\n            },\n            {\n                \"name\": \"coding\",\n                \"level\": 3,\n            }\n        ],\n        \"other\": {\n            \"judge\": \"又菜又爱玩\"\n        }\n    };\n\n    const fucked = deepProxy(fuck, {\n        get(target, p, receiver) {\n            console.log(`尝试获取属性： ${p}`);\n            return target[p];\n        }\n    });\n\n    console.log(fucked.skill[0].name);\n\n    // Output:\n    // 尝试获取属性： skill\n    // 尝试获取属性： 0\n    // 尝试获取属性： name\n    // eat\n\n})();\n\n```\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsrei%2Fjs-deep-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsrei%2Fjs-deep-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsrei%2Fjs-deep-proxy/lists"}