All Projects → Olical → Heir

Olical / Heir

Licence: Unlicense license
Helper functions for prototypical inheritance in JavaScript

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Heir

lua-classy
Class-based OO library for Lua
Stars: ✭ 28 (-54.1%)
Mutual labels:  classes
My Android Garage
A quick reference guide for Android development.
Stars: ✭ 66 (+8.2%)
Mutual labels:  inheritance
openmoji-awesome
CSS classes to easily integrate Openmoji in your website!
Stars: ✭ 19 (-68.85%)
Mutual labels:  classes
HostsFileManagement
Hosts file management on Windows systems using PowerShell classes
Stars: ✭ 25 (-59.02%)
Mutual labels:  classes
django-apptemplates
Django template loader that allows you to load and override a template from a specific Django application.
Stars: ✭ 43 (-29.51%)
Mutual labels:  inheritance
Java-Programs
Java Practiced Problems including concepts of OOPS, Interface, String , Collection.
Stars: ✭ 51 (-16.39%)
Mutual labels:  inheritance
Clean Code Javascript
🛁 Clean Code concepts adapted for JavaScript
Stars: ✭ 62,912 (+103034.43%)
Mutual labels:  inheritance
JavaCertification
This is a full resource guide for my attempt to get Java 11 Certified
Stars: ✭ 67 (+9.84%)
Mutual labels:  inheritance
SoftUni-Software-Engineering
SoftUni- Software Engineering
Stars: ✭ 47 (-22.95%)
Mutual labels:  classes
java-notes
Complete Java Note for colleges in Nepal.
Stars: ✭ 30 (-50.82%)
Mutual labels:  inheritance
custom-error-test
Compare and test various custom error implementations.
Stars: ✭ 32 (-47.54%)
Mutual labels:  inheritance
clean-code-javascript-ko
🛁 Clean Code concepts adapted for JavaScript - 한글 번역판 🇰🇷
Stars: ✭ 1,767 (+2796.72%)
Mutual labels:  inheritance
emitty
A platform for finding dependencies between files and building tools for incremental compilation or build.
Stars: ✭ 69 (+13.11%)
Mutual labels:  inheritance
yii2-activerecord-inheritance
ActiveRecord Inheritance is an util to provide the Class Table Inheritance Pattern the to the Yii2 framework
Stars: ✭ 18 (-70.49%)
Mutual labels:  inheritance
spruceup
Spruce up CSS classes
Stars: ✭ 12 (-80.33%)
Mutual labels:  classes
MulleObjC
💎 A collection of Objective-C root classes for mulle-objc
Stars: ✭ 50 (-18.03%)
Mutual labels:  classes
kaop
Advanced OOP Library with createClass, inheritance, providers, injectors, advices which enables handy Inversion of Control techniques
Stars: ✭ 40 (-34.43%)
Mutual labels:  inheritance
java-springboot
(Java & React) Yazılım Geliştirici Yetiştirme Kampı Java kısmına ait yazılan kaynak kodlar ve ödev çalışmalarım.
Stars: ✭ 17 (-72.13%)
Mutual labels:  inheritance
ta-json
Type-aware JSON serializer/parser
Stars: ✭ 67 (+9.84%)
Mutual labels:  classes
Java-design-patterns
Java Design patterns.
Stars: ✭ 49 (-19.67%)
Mutual labels:  inheritance

Heir npm

Helper functions for prototypical inheritance in JavaScript.

Use the source code and JSDoc comments as documentation, here's a quick example to get you started.

const heir = require('heir')

// Create the base class.
function Base() {}

// Add a method.
Base.prototype.foo = function () {
  return 'Base#foo'
}

// Create a sub class which inherits from base.
function Sub() {}
heir.inherit(Sub, Base)

// Mix in some functionality enhancing objects.
heir.mixin(Sub, events)
heir.mixin(Sub, pooling)

// Change the original method.
Sub.prototype.foo = function () {
  return [
    'Sub#foo',
    Sub._super.foo.call(this)
  ].join(', ')
}

// Create an instance of Sub and call it's method.
const s = new Sub()
s.foo() // Returns "Sub#foo, Base#foo"

Unlicense

This project is given to you under the unlicense, as documented in the UNLICENSE file in this directory. Enjoy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].