This repository is a mirror of the component module yields/extensible. It has been modified to work with NPM+Browserify. You can install it using the command npm install npmcomponent/yields-extensible
. Please do not open issues or send pull requests against this repo. If you have issues with this repo, report it to npmcomponent.
extensible constructors.
Install with component(1):
$ component install yields/extensible
function View(){}
function FormView(){}
function TabView(){}
function ComplexFormView(){}
// => Make the view extensible
extensible(View);
// => FormView extends View
View.extend(FormView);
// => ComplexFormView extends FormView
FormView.extend(ComplexFormView);
Add recursive .extend(Other)
method to Constructor
.
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.
MIT