{"id":15605503,"url":"https://github.com/tswayne/class-bindall","last_synced_at":"2025-11-08T12:30:40.972Z","repository":{"id":57199444,"uuid":"146133631","full_name":"tswayne/class-bindall","owner":"tswayne","description":"BindAll specifically for javascript classes","archived":false,"fork":false,"pushed_at":"2018-08-25T22:26:41.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T05:33:49.785Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tswayne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-25T22:23:36.000Z","updated_at":"2018-08-25T22:26:43.000Z","dependencies_parsed_at":"2022-09-16T14:51:21.131Z","dependency_job_id":null,"html_url":"https://github.com/tswayne/class-bindall","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tswayne%2Fclass-bindall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tswayne%2Fclass-bindall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tswayne%2Fclass-bindall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tswayne%2Fclass-bindall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tswayne","download_url":"https://codeload.github.com/tswayne/class-bindall/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239558625,"owners_count":19658925,"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-03T04:07:31.808Z","updated_at":"2025-11-08T12:30:40.939Z","avatar_url":"https://github.com/tswayne.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Class bindall\n\nA bindall method specifically for classes.  Can dynamically bind all class methods to instance, or a select set.  \n\nThe resulting bound methods are also logged properly (unlike lodash's bindall) in performance monitoring and profiling tools such as Newrelic or nodes native profiler.nodes native profiler.\n\n## Usage\n\n#### Dynamic\n\n```\nconst bindAll = require('class-bindall')\n\nclass MyClass {\n  constructor() {\n    // methodA and methodB are automatically bound to the instance\n    bindAll(this)\n  }\n\n  methodA() {\n    console.log('A')\n  }\n\n  methodB() {\n    console.log('B')\n  }\n}\n\n```\n\n#### Manual\n\n```\nconst bindAll = require('class-bindall')\n\nclass MyClass {\n  constructor() {\n    // only methodB is bound to the instance\n    bindAll(this, ['methodB'])\n  }\n\n  methodA() {\n    console.log('A')\n  }\n\n  methodB() {\n    console.log('B')\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftswayne%2Fclass-bindall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftswayne%2Fclass-bindall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftswayne%2Fclass-bindall/lists"}