{"id":15597121,"url":"https://github.com/alorel/bound-decorator","last_synced_at":"2025-08-03T13:05:55.864Z","repository":{"id":34260238,"uuid":"173581358","full_name":"Alorel/bound-decorator","owner":"Alorel","description":"A TypeScript/ES7 decorator for automatically binding methods to the class instance","archived":false,"fork":false,"pushed_at":"2023-12-14T19:31:19.000Z","size":528,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T15:51:28.719Z","etag":null,"topics":["auto","babel","bind","bound","decorator","es7","method","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alorel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null},"funding":{"github":["Alorel"],"custom":["https://paypal.me/alorel"]}},"created_at":"2019-03-03T13:54:24.000Z","updated_at":"2024-05-30T14:23:09.000Z","dependencies_parsed_at":"2023-01-15T05:44:49.052Z","dependency_job_id":"47c3ebe4-60b6-4256-9acc-0c95f3bb5e8e","html_url":"https://github.com/Alorel/bound-decorator","commit_stats":{"total_commits":181,"total_committers":7,"mean_commits":"25.857142857142858","dds":0.5966850828729282,"last_synced_commit":"3dd119dab936bd2eed414d2bcf08739b08a0e5ae"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alorel%2Fbound-decorator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alorel%2Fbound-decorator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alorel%2Fbound-decorator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alorel%2Fbound-decorator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alorel","download_url":"https://codeload.github.com/Alorel/bound-decorator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251299291,"owners_count":21567194,"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":["auto","babel","bind","bound","decorator","es7","method","typescript"],"created_at":"2024-10-03T01:20:32.010Z","updated_at":"2025-04-28T10:49:23.776Z","avatar_url":"https://github.com/Alorel.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Alorel","https://paypal.me/alorel"],"categories":[],"sub_categories":[],"readme":"# Bound decorator\n\nAn ES7 decorator for making class methods bound to the class instance (including statics).\n\n[![MASTER CI status](https://github.com/Alorel/bound-decorator/actions/workflows/core.yml/badge.svg)](https://github.com/Alorel/bound-decorator/actions/workflows/core.yml?query=branch%3Amaster)\n[![NPM badge](https://img.shields.io/npm/v/%40aloreljs/bound-decorator)](https://www.npmjs.com/package/%40aloreljs/bound-decorator)\n[![dependencies badge](https://img.shields.io/librariesio/release/npm/%40aloreljs/bound-decorator)](https://libraries.io/npm/@aloreljs%2Fbound-decorator)\n[![Coverage Status](https://coveralls.io/repos/github/Alorel/bound-decorator/badge.svg)](https://coveralls.io/github/Alorel/bound-decorator)\n\n-----\n\n# Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Installation](#installation)\n- [Compatibility](#compatibility)\n- [Usage](#usage)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n# Installation\n\n```\nnpm install @aloreljs/bound-decorator\n```\n\n# Compatibility\n\nThe library's only goal is to be compatible with Typescript 5 decorators which, at the time of writing, use the [2022-03 stage 3 decorators proposal](https://2ality.com/2022/10/javascript-decorators.html).\n\n# Usage\n\n```javascript\nimport {BoundMethod} from '@aloreljs/bound-decorator';\n\nclass MyClass {\n  \n  @BoundMethod()\n  method1() {\n    // equivalent to\n    // this.method1 = this.method1.bind(this);\n  }\n  \n  @BoundMethod('a', 'b')\n  method2(a, b, c) {\n    // equivalent to\n    // this.method2 = this.method2.bind(this, 'a', 'b');\n  }\n\n  @BoundMethod()\n  static foo() {\n    // Equivalent to\n    // MyClass.foo = MyClass.foo.bind(MyClass);\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falorel%2Fbound-decorator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falorel%2Fbound-decorator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falorel%2Fbound-decorator/lists"}