{"id":17965347,"url":"https://github.com/t2ym/thin-trap","last_synced_at":"2025-04-03T20:17:42.942Z","repository":{"id":58231627,"uuid":"79089308","full_name":"t2ym/thin-trap","owner":"t2ym","description":"Thin ES6 Proxy Wrapper for Better Transparency","archived":false,"fork":false,"pushed_at":"2017-01-17T13:16:01.000Z","size":5,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-09T10:42:18.154Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t2ym.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-16T06:27:18.000Z","updated_at":"2017-01-16T06:27:42.000Z","dependencies_parsed_at":"2022-08-31T00:31:15.729Z","dependency_job_id":null,"html_url":"https://github.com/t2ym/thin-trap","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2ym%2Fthin-trap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2ym%2Fthin-trap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2ym%2Fthin-trap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t2ym%2Fthin-trap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t2ym","download_url":"https://codeload.github.com/t2ym/thin-trap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247070927,"owners_count":20878586,"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-29T12:41:47.733Z","updated_at":"2025-04-03T20:17:42.904Z","avatar_url":"https://github.com/t2ym.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/thin-trap.svg)](https://www.npmjs.com/package/thin-trap)\n[![Bower](https://img.shields.io/bower/v/thin-trap.svg)](https://customelements.io/t2ym/thin-trap/)\n\n# thin-trap\n\nThin ES6 Proxy Wrapper for Better Transparency (experimental)\n\n```javascript\nwindow.XMLHttpRequest = trap(window.XMLHttpRequest,\n  function loggerForwarder(trapName, args, target, outerProxy, thisArg, proxyForThis) {\n    console.log('trap:', trapName, args,\n      'for', (typeof target === 'function' ? target.name : target),\n      'thisArg', (thisArg \u0026\u0026 thisArg.name ? thisArg.name : thisArg));\n    return Reflect[trapName](...args);\n  }\n);\n```\n\n## Install\n\n### Browsers\n\n```sh\n  bower install --save thin-trap\n```\n\n### NodeJS\n\n```sh\n  npm install --save thin-trap\n```\n\n## Import\n\n### Browsers\n\n```html\n  \u003cscript src=\"path/to/bower_components/thin-trap/trap.js\"\u003e\u003c/script\u003e\n```\n\n### NodeJS\n\n```javascript\nconst trap = require('thin-trap/trap.js');\n```\n\n## API\n\nTBD\n\n## License\n\n[BSD-2-Clause](https://github.com/t2ym/thin-trap/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft2ym%2Fthin-trap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft2ym%2Fthin-trap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft2ym%2Fthin-trap/lists"}