{"id":16538620,"url":"https://github.com/kyleect/tap","last_synced_at":"2026-06-20T08:31:27.140Z","repository":{"id":132692477,"uuid":"59537964","full_name":"kyleect/tap","owner":"kyleect","description":"A typescript implementation of Ruby's tap method","archived":false,"fork":false,"pushed_at":"2016-05-27T02:09:02.000Z","size":27,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T00:44:30.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/kyleect.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":"2016-05-24T03:36:33.000Z","updated_at":"2017-06-04T05:06:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"70acf8ea-cf10-4477-b1fa-8283d76db0a0","html_url":"https://github.com/kyleect/tap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kyleect/tap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyleect%2Ftap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyleect%2Ftap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyleect%2Ftap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyleect%2Ftap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyleect","download_url":"https://codeload.github.com/kyleect/tap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyleect%2Ftap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34563535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"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":[],"created_at":"2024-10-11T18:46:10.715Z","updated_at":"2026-06-20T08:31:27.125Z","avatar_url":"https://github.com/kyleect.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tap\n\n[![Build Status](https://travis-ci.org/maexsoftware/tap.svg?branch=master)](https://travis-ci.org/maexsoftware/tap)\n\nA typescript implementation of Ruby's tap.\n\n## Usage\n\nIf you want to get started right away then you can extend `TappableClass`. This\nwill give you a basic implementation of the tap method.\n\n```ts\nclass BasicExampleClass extends TappableClass {\n  public value:number = 0;\n  \n  public get ():number {\n    return this.value;\n  }\n  \n  public set (value:number):this {\n    this.value = value;\n    return this;\n  }\n}\n\nconst example = new BasicExampleClass();\n\nexample\n  .set(10)\n  .set(20)\n  .tap(value =\u003e console.log(value)) // 20\n  .set(30)\n  .get(); // 30\n```\n\nIf you want more control over the tap method implementation for your class then\nyou can simply implement `ITappableClass` with your own implementation.\n\n```ts\nclass ExampleClass implements ITappableClass {\n  tap (fn: (value: this) =\u003e void): this {\n    const clone:this = Object.assign({ __proto__: Object.getPrototypeOf(this) }, this);\n    const froze:this = Object.freeze(clone);\n    fn.call(null, froze);\n    return this;\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyleect%2Ftap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyleect%2Ftap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyleect%2Ftap/lists"}