Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

Repository files navigation

extensible

extensible constructors.

Installation

Install with component(1):

$ component install yields/extensible

Example

functionView(){}functionFormView(){}functionTabView(){}functionComplexFormView(){}// => Make the view extensibleextensible(View);// => FormView extends ViewView.extend(FormView);// => ComplexFormView extends FormViewFormView.extend(ComplexFormView);

API

extensible(Constructor)

Add recursive .extend(Other) method to Constructor.

component/inherit

extensible uses component/inherit to do the inheritance, but it's different from inherit since it adds .extend() static method to your constructor.

this means you can have a single extensible(View) and do View.extend(OtherView) instead of installing component/inherit on each view component.

License

MIT

About

extensible constructors

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages