{"id":23382174,"url":"https://github.com/code0wl/inherito","last_synced_at":"2025-04-08T08:44:52.169Z","repository":{"id":57273862,"uuid":"43385315","full_name":"code0wl/inherito","owner":"code0wl","description":"Easy object inheritance control for JavaScript by using composable objects","archived":false,"fork":false,"pushed_at":"2016-05-07T07:45:07.000Z","size":240,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T05:41:22.709Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code0wl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-29T18:10:30.000Z","updated_at":"2016-04-18T04:20:31.000Z","dependencies_parsed_at":"2022-09-17T15:11:30.460Z","dependency_job_id":null,"html_url":"https://github.com/code0wl/inherito","commit_stats":null,"previous_names":["ositoozy/inherito"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0wl%2Finherito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0wl%2Finherito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0wl%2Finherito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0wl%2Finherito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code0wl","download_url":"https://codeload.github.com/code0wl/inherito/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247808143,"owners_count":20999668,"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-12-21T21:17:58.396Z","updated_at":"2025-04-08T08:44:52.152Z","avatar_url":"https://github.com/code0wl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\u003cimg src=\"assets/main-logo.png\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003cimg src=\"https://travis-ci.org/code0wl/inherito.svg?branch=master\" \u003e\u003c/p\u003e\ninHerito is a composable factory that allows you create the objects you want with ease and with the correct inheritance. It allows you to use properties and function methods from other objects without overusing and overinheriting. Every object that is created gets it's own logging information if option is set to true and allows you to keep a mindful eye on your objects. This is my take on solving the original OOP problem of overinheriting.\nNow you have OLOO (Objects Linked to Other Objects) and inherit only if you say so.\n  \nDo you need this design pattern? No!\n\nWould it be useful for bootstrapping a new application? Hell yes!\nTo set the tone and get the correct mindset. [watch this](https://www.youtube.com/watch?t=159\u0026v=8pTEmbeENF4)\n\nNever be afraid again to have more than one level deep of inherited object inheritance tree. In OOP we usually create newer objects for the sake of inheritance and not for the sake of\nsemantic correctness. \n\n- Ex: Let's consider a dog. A good and sane OOP developer would most likely create an abstract tree that resides the dog animal this way\n\t\n\tAnimal // And Followed by animal properties (ex blood, heart, etc.)\n\tAnimal.dog // And Followed by dog properties (bark, bite, age, how many legs, etc.)\n\t\nBut let's say in that same program we want to make a robot dog, which semantically inherits a of the dog's properties to begin with. But we know semantically that robot dog belongs basically from two classes.\nIt's not an Animal anymore but shares a lot with dog. \t\n\n\tAnimal // And Followed by animal properties (ex blood, heart, etc.)\n\tAnimal.dog // And Followed by dog properties (bark, bite, age, etc.)\n\t\nMy proposed solution is inherit or mixin the functions or static props you need. This keeps your objects clean and as reusable as possible. And as a complete extra benefit: You shall be more semantically correct.\nAllow me to illustrate (use your imagination :D)\n\n\tlet robotDog = dog.create({\n\t\tinherit: [bite, bark],\n\t\tmaterial: metal\n\t});\n\n\tIs it a dog? true\n\tIs it a robot? true \n\n###How to use\nThis tool has no depencies except for running it in at least an ES5 capable environment. Can be used for Node or Window environment if using the render feature or not. You may use es15 becuase of babel integration. \nA more fleshed out documentation will follow as I keep building up features. For now check the example files.\n\nEnsure that you have gulp-cli installed globally by \n\t\n\t$ sudo npm i gulp-cli -g\n\t\nOnce that is done, just install like any other project using node \u0026 npm\n\n\t$ npm i \n\t$ gulp serve\n\nIn development\n- Proper documentation\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/code0wl/inherito/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode0wl%2Finherito","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode0wl%2Finherito","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode0wl%2Finherito/lists"}