JSFiddle - React, Tailwind, and code Playground
by gschutz
JavaScript
var Name = (function(options){
options = options || {};
options = _.defaults(options, {
// default options
});
var ChildName = function(a) {
var ChildName = function() {
// content
this.name = "Treta";
this.treta = function() {
}
}
ChildName.prototype = Name.prototype;
//return _.defaults(new ChildName(), InheritsMethod);
return new ChildName();
}
var Name = function(){};
Name.prototype.ChildName = ChildName;
console.log(a instanceof ChildName);
return new Name(options);
});
var a = Name();
var b = Name().ChildName(b);
console.log(Name().ChildName().isInstanceOf(b))
console.log(a instanceof Name);