this project was linked to in a bunch of userscripts, any changes made will break those. i may create a different repo to replace this but whatever you do please don't use this code without modifying it first
functions to combine and manipulate functions
supports manipulating class constructors (for the most part, sometimes still has issues)
returns a function that is the combination of all input functions (o and i), with the prototype of o
this function is supposed to have an options parameter but the code is messed up.
returns function b but with the properties and prototype of function a. this is useful for replacing class constructors.
returns empty function with properties and prototype of a, but every function in the properties/prototype (not inside arrays/objects) is also an empty function.
output code shown does not represent actions of functions, it's made to illustrate how resulting code behaves.
function foo(a) {
this.a = a;
}
foo.fooValue = 3;
foo.prototype.fooProto = function () {
this.proto = "foo";
}
function bar(b, c) {
this.b = b;
this.c = c;
}
bar.prototype.barProto = function () {
this.proto = "bar";
}
function result(ab, c) {
this.a = ab;
this.b = ab;
this.c = c;
}
result.fooValue = 3;
result.prototype.fooProto = function () {
this.proto = "foo";
}
result.prototype.barProto = function () {
this.proto = "bar";
}
function result(b, c) {
this.b = b;
this.c = c;
}
result.fooValue = 3;
result.prototype.fooProto = function () {
this.proto = "foo";
}
result.prototype.barProto = function () {
this.proto = "bar";
}
function result() { }
result.fooValue = 3;
result.prototype.fooProto = function () { }