{"id":17233856,"url":"https://github.com/caseywebdev/herit","last_synced_at":"2025-12-12T03:49:22.905Z","repository":{"id":6537503,"uuid":"7778774","full_name":"caseywebdev/herit","owner":"caseywebdev","description":"Easy to use JavaScript \"Class\" inheritance with support for \"instance\" and \"static\" properties.","archived":false,"fork":false,"pushed_at":"2015-06-02T16:54:41.000Z","size":180,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T10:11:51.999Z","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/caseywebdev.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":"2013-01-23T16:33:21.000Z","updated_at":"2015-09-17T18:15:35.000Z","dependencies_parsed_at":"2022-09-11T04:23:43.013Z","dependency_job_id":null,"html_url":"https://github.com/caseywebdev/herit","commit_stats":null,"previous_names":["caseywebdev/underscore-inherit"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseywebdev%2Fherit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseywebdev%2Fherit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseywebdev%2Fherit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseywebdev%2Fherit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caseywebdev","download_url":"https://codeload.github.com/caseywebdev/herit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732484,"owners_count":21152852,"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-15T05:27:02.296Z","updated_at":"2025-12-12T03:49:17.847Z","avatar_url":"https://github.com/caseywebdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# herit\n\n[![Build Status](https://secure.travis-ci.org/caseywebdev/herit.png)](http://travis-ci.org/caseywebdev/herit)\n\nEasy to use JavaScript \"Class\" inheritance with support for \"instance\" and\n\"static\" properties.\n\n## Install\n\nIn the browser, simply include the script on the page.\n\nIn Node, all you need to do is `var herit = require('herit')`.\n\n## Usage\n\n```js\nvar Animal = herit({\n  name: 'Chupacabra',\n  sound: 'roarmeowbarkmoo',\n  sing: function () {\n    alert(this.name + ' says ' + Array(5).join(this.sound));\n  }\n});\n\nvar HardWorker = herit();\n\nvar Dog = herit(Animal, HardWorker, {\n  name: 'Gunner',\n  sound: 'woof'\n}, {staticProp: 'hello'});\n\nvar Cat = herit(Animal, {\n  name: 'Mittens',\n  sound: 'meow'\n});\n\n(new Animal()).sing(); // alert('Chupacabra says roarmeowbarkmooroarmeowbarkmooroarmeowbarkmooroarmeowbarkmooroarmeowbarkmoo')\n(new Cat()).sing(); // alert('Mittens says meow')\n(new Dog()).sing(); // alert('Gunner says woof')\n\n// (new Cat) instanceof Animal === true\n// (new Cat) instanceof Cat === true\n\n// Dog.staticProp === 'hello'\n// (new Dog) instanceof Animal === true\n// (new Dog) instanceof HardWorker === true\n// (new Dog) instanceof Dog === true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaseywebdev%2Fherit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaseywebdev%2Fherit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaseywebdev%2Fherit/lists"}