{"id":17446003,"url":"https://github.com/jamen/extending","last_synced_at":"2025-08-10T08:44:11.199Z","repository":{"id":96784410,"uuid":"58614394","full_name":"jamen/extending","owner":"jamen","description":"Create extremely simple extendable objects.","archived":false,"fork":false,"pushed_at":"2016-05-12T10:52:21.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-09T05:57:04.878Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamen.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-12T06:31:39.000Z","updated_at":"2023-02-19T09:02:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b0e3bca-4966-4e74-9032-ca7642f91bb8","html_url":"https://github.com/jamen/extending","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"bc1c8979a90aa69647a9afdd77ef91825eaccf1d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jamen/extending","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fextending","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fextending/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fextending/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fextending/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamen","download_url":"https://codeload.github.com/jamen/extending/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fextending/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269698872,"owners_count":24461198,"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-08-10T02:00:08.965Z","response_time":71,"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-17T18:20:04.282Z","updated_at":"2025-08-10T08:44:11.140Z","avatar_url":"https://github.com/jamen.png","language":"JavaScript","readme":"# Extending [![Build State][travis-img]][travis]\n\u003e Create extremely simple extendable objects.\n\n```javascript\nvar extending = require('extending');\n\n// Create initial object\nvar foo = extending({ foo: 1 });\nconsole.log(foo.foo);\n\n// Extend off it by calling it as a function\nvar bar = foo({ bar: 2 });\n\n// Continue extending with new objects.\nvar baz = bar({ baz: 3 });\n\nconsole.log([ baz.foo, baz.bar, baz.baz ]);\n// =\u003e [1, 2, 3]\n```\n\n## Installation\n```shell\n$ npm install --save extending\n```\n```javascript\nvar extending = require('extending');\n```\n\n## API\n### `extending([object])`\nCreate an easily extendable object.\n - `object` (`Object`): Object to start with (default: `{}`).\n\nReturns an \"extendable\", a function with your object's properties that can be called to extend.\n\nExample:\n```javascript\nvar foo = extending({ ... });\nvar bar = foo({ ... });\nvar baz = bar({ ... });\n// ...\n```\n\n### `extendable([object])`\nThe result of calling `extending`, your extendable object.\n - `object` (`Object`): Extension on the original object.\n\nThis function has the properties of your object.\n\n#### `extendable.toObject()` Helper\nCreate an object from the extendable.\n\nExample:\n```javascript\nvar foo = extending({ foo: 1, bar: 2 });\nfoo.toObject();\n// =\u003e { foo: 1, bar: 2 }\n```\n\n#### `extendable.extend([object])` Helper\nAn alias to calling the extendable function.\n - `object` (`Object`): Extension on the original object.\n\nExample:\n```javascript\nvar foo = extending({ foo: 1 });\nvar bar = foo.extend({ bar: 2 });\nvar baz = bar.extend({ baz: 3 });\n// ...\n```\n\n#### `extendable.toJSON()` Helper\nSerialize your extendables into JSON.\n\nExample:\n```javascript\nvar foo = extending({ foo: 1 });\nvar bar = foo.extend({ bar: 2 });\nvar baz = bar.extend({ baz: 3 });\n\nJSON.stringify(baz);\n// =\u003e \"{ \\\"foo\\\": 1, \\\"bar\\\": 2, \\\"baz\\\": 3 }\"\n```\n\n\n## Credits\n| ![jamen][avatar] |\n|:---:|\n| [Jamen Marzonie][github] |\n\n## License\n[MIT](LICENSE) \u0026copy; Jamen Marzonie\n\n  [avatar]: https://avatars.githubusercontent.com/u/6251703?v=3\u0026s=125\n  [github]: https://github.com/jamen\n  [travis]: https://travis-ci.org/jamen/extending\n  [travis-img]: https://travis-ci.org/jamen/extending.svg\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fextending","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamen%2Fextending","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fextending/lists"}