{"id":15354919,"url":"https://github.com/capaj/o.extend","last_synced_at":"2025-04-04T18:18:23.964Z","repository":{"id":19227919,"uuid":"22462387","full_name":"capaj/o.extend","owner":"capaj","description":"recursive Object.extend() which respects and merges ES5 getters and setters","archived":false,"fork":false,"pushed_at":"2016-02-02T22:20:28.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T09:38:20.454Z","etag":null,"topics":[],"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/capaj.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}},"created_at":"2014-07-31T08:38:57.000Z","updated_at":"2016-01-26T02:02:40.000Z","dependencies_parsed_at":"2022-08-01T03:08:40.579Z","dependency_job_id":null,"html_url":"https://github.com/capaj/o.extend","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fo.extend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fo.extend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fo.extend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fo.extend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capaj","download_url":"https://codeload.github.com/capaj/o.extend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226191,"owners_count":20904467,"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-01T12:21:40.178Z","updated_at":"2025-04-04T18:18:23.928Z","avatar_url":"https://github.com/capaj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"o.extend\n====================\n\nObject.prototype.extend() for node.js and the browser. ES5 compatible. ES5 incompatible enviroments are not supported(IE8 and less).\nHas also a method Object.prototype.copyOwnProperties() which is much much simpler and faster.\n#Usage\n    \n    var extended = Object.extend({b:1}, {a:2});\n    //extended === {a:2, b:1}\n    var extended = Object.copyOwnProperties({b:1}, {a:2});\n    //extended === {a:2, b:1}\n    \nFor usage examples, take a look at unit tests: https://github.com/capaj/o.extend/blob/master/test.js\n\nAvailable via jspm/bower:\n    \n    jspm install github:capaj/o.extend\n    bower install o.extend\n  \nor npm:\n\n    npm install o.extend\n\n##Why use this and not other implementations? \nBecause this is only extend which can properly merge ES5 property descriptors, which means that if you merge object a with a setter and object b with getter on same property, result will have both getter and setter on that property.\nSo you don't lose any of your property descriptors when extending your objects.\n\n\nAlso you won't lose a setter when object which is extending base has a value. In that case the setter is not replaced, but instead it is called with the value as you would probably expect.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Fo.extend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapaj%2Fo.extend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Fo.extend/lists"}