{"id":17188782,"url":"https://github.com/benjohnde/delegable-proxy","last_synced_at":"2025-03-25T04:49:12.607Z","repository":{"id":57145369,"uuid":"76872547","full_name":"benjohnde/delegable-proxy","owner":"benjohnde","description":"Multi-level deepened proxy.","archived":false,"fork":false,"pushed_at":"2018-02-13T18:12:45.000Z","size":79,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T11:12:53.269Z","etag":null,"topics":[],"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/benjohnde.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}},"created_at":"2016-12-19T15:16:00.000Z","updated_at":"2025-02-21T23:06:15.000Z","dependencies_parsed_at":"2022-09-06T00:03:26.491Z","dependency_job_id":null,"html_url":"https://github.com/benjohnde/delegable-proxy","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjohnde%2Fdelegable-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjohnde%2Fdelegable-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjohnde%2Fdelegable-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjohnde%2Fdelegable-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benjohnde","download_url":"https://codeload.github.com/benjohnde/delegable-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245401397,"owners_count":20609166,"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","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":[],"created_at":"2024-10-15T01:09:51.278Z","updated_at":"2025-03-25T04:49:12.583Z","avatar_url":"https://github.com/benjohnde.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# delegable-proxy\n\nMulti-level deepened proxy, works sync.\n\n[![Build Status](https://travis-ci.org/benjohnde/delegable-proxy.svg?branch=master)](https://travis-ci.org/benjohnde/delegable-proxy)\n[![npm version](https://badge.fury.io/js/delegable-proxy.svg)](https://badge.fury.io/js/delegable-proxy)\n[![Maintainability](https://api.codeclimate.com/v1/badges/853f4e7f83c9af1a73c5/maintainability)](https://codeclimate.com/github/benjohnde/delegable-proxy/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/853f4e7f83c9af1a73c5/test_coverage)](https://codeclimate.com/github/benjohnde/delegable-proxy/test_coverage)\n\n## Main purpose\n\nFor convenience sake we want to work with common lists and objects but keep track of every change to commit them to the underlying storage.\n`Object.observe()` and `Array.observe()` are pretty much the exact thing we want, but both work async via polling.\n\nThe proxy returns the type of mutation (`add`, `del`, `mod`) and which position (in root object) is affected.\n\n## Example\n\n```javascript\nimport DelegableProxy from 'delegable-proxy'\n\nconst example = [{'message': 'hello world'}]\nconst data = DelegableProxy.wire(example, (action, pos) =\u003e {\n  console.log(action, pos)\n})\ndata.push({'message': 'hi there!'})\ndata.push({'message': 'knock knock!'})\n```\n\n## RunKit\n\nhttps://runkit.com/586ca4b68acd620014d54362/586ca4b68acd620014d54363\n\n## Known issues\n\n- The way `Array.splice` works, leads to a lot of mutations on inner arrays. Better use the slow `delete foo[42].bar.stuff[0]`.\n- We do not recommend to use this library in a production environment. This was just a fun project, some kind of PoC for us. We still use it in a dev environment which is only used internally.\n\n## Usage\n\n```bash\n# add the library\nyarn add delegable-proxy\n\n# build the library\nyarn build\n\n# run the tests\nyarn test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjohnde%2Fdelegable-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenjohnde%2Fdelegable-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjohnde%2Fdelegable-proxy/lists"}