{"id":25627613,"url":"https://github.com/jeppech/generic-builder-ts","last_synced_at":"2025-07-25T10:33:46.145Z","repository":{"id":57120956,"uuid":"313735959","full_name":"jeppech/generic-builder-ts","owner":"jeppech","description":"A generic builder class for TypeScript","archived":false,"fork":false,"pushed_at":"2021-01-22T15:58:09.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T14:18:29.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jeppech.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":"2020-11-17T20:32:29.000Z","updated_at":"2021-01-22T15:58:11.000Z","dependencies_parsed_at":"2022-08-24T04:40:12.133Z","dependency_job_id":null,"html_url":"https://github.com/jeppech/generic-builder-ts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeppech/generic-builder-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeppech%2Fgeneric-builder-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeppech%2Fgeneric-builder-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeppech%2Fgeneric-builder-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeppech%2Fgeneric-builder-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeppech","download_url":"https://codeload.github.com/jeppech/generic-builder-ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeppech%2Fgeneric-builder-ts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266991022,"owners_count":24017732,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"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":"2025-02-22T17:53:33.651Z","updated_at":"2025-07-25T10:33:46.105Z","avatar_url":"https://github.com/jeppech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generic builder for TypeScript\nThis is small helper class for making buildable objects.\n\n## Installation\nUse your favourite package manager.\n```\npnpm add @jeppech/generic-builder-ts\n```\n\n## Usage\n```ts\nimport { Builder } from '@jeppech/generic-builder-ts'\n\n// Start by declaring an interface, describing your object\n\ninterface Person {\n  name: string\n  age: number\n  dob?: Date\n}\n\n// Next create a class, with the same name of the interface. This is also known as Declaration Merging.\n\nclass Person {\n  constructer(builder: Builder\u003cPerson\u003e \u0026 Person) {\n    Object.assign(this, builder)\n  }\n}\n\n// Notice, that you get hints when calling the `with` method.\n\nconst person = new Builder(Person)\n  .with('name', 'John')\n  .with('age', 25)\n  .with('dob', new Date('2005-10-13'))\n  .build()\n```\n\n## Acknowledgment\nThis was inspired by https://github.com/hanterlantant/ts-generic-builder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeppech%2Fgeneric-builder-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeppech%2Fgeneric-builder-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeppech%2Fgeneric-builder-ts/lists"}