{"id":19003427,"url":"https://github.com/i3raby/prototype","last_synced_at":"2026-04-20T17:30:22.816Z","repository":{"id":254096768,"uuid":"845478901","full_name":"i3raby/Prototype","owner":"i3raby","description":"A utility function that allows you to dynamically extend objects with additional properties and methods at runtime. Use this function to easily add methods and properties to existing objects without modifying their original structure.","archived":false,"fork":false,"pushed_at":"2024-08-21T10:42:23.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T19:12:58.321Z","etag":null,"topics":["javascript","prototype","prototypes","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/i3raby.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":"2024-08-21T10:34:12.000Z","updated_at":"2024-08-21T10:44:27.000Z","dependencies_parsed_at":"2024-08-21T12:17:37.352Z","dependency_job_id":null,"html_url":"https://github.com/i3raby/Prototype","commit_stats":null,"previous_names":["i3raby/prototype"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i3raby%2FPrototype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i3raby%2FPrototype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i3raby%2FPrototype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/i3raby%2FPrototype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/i3raby","download_url":"https://codeload.github.com/i3raby/Prototype/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240027412,"owners_count":19736209,"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":["javascript","prototype","prototypes","typescript"],"created_at":"2024-11-08T18:19:02.320Z","updated_at":"2026-04-20T17:30:22.772Z","avatar_url":"https://github.com/i3raby.png","language":"JavaScript","readme":"# Dynamic Object Extension Utility\n\nA utility function for dynamically extending objects with additional properties and methods at runtime. This library allows you to enhance existing objects without altering their original structure.\n\n## Features\n\n- Dynamically add properties and methods to objects.\n- Extend existing objects at runtime.\n- Simple and flexible API.\n\n## Usage\nHere's how you can use the `Prototype` function to extend an object\n\n```js\nconst user = {};\n\nconst Prototype = require('./src');\nPrototype(user, {\n    id: `${Math.floor(Math.random() * 99999999999) + 88888888}`,\n    username: function() {\n        return 'Username'\n    }\n})\n \nconsole.log(user.id);\nconsole.log(user.username());\n```\n\n## API\n\n### **`Prototype(object, props)`**\n\nExtends the `object` with properties and methods defined in `props`.\n\n- `object`: The target object to be extended.\n- `props`: An object containing the properties and methods to add. Each key represents the property or method name, and each value can be a function (method) or a string (property).\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/i3raby/Prototype/blob/main/LICENSE) file for details.\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request to contribute to this project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi3raby%2Fprototype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fi3raby%2Fprototype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fi3raby%2Fprototype/lists"}