Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose extendPrototype as factory.extend #14

Closed
kixxauth opened this issue Nov 23, 2015 · 0 comments
Closed

Expose extendPrototype as factory.extend #14

kixxauth opened this issue Nov 23, 2015 · 0 comments

Comments

@kixxauth
Copy link
Owner

It would be great if we could treat factory functions like traditional JavaScript constructor functions, but with some sugar. So you could do something like this:

var Mammal = BRIXX.factory();
Mammal.prototype; // {} blank Object

var Cat = Mammal.extend(EventEmitter.prototype, {
    legs: function () { return 4; }
});
Cat.prototype; // Includes Mammal, EventEmitter, and {legs: }

Would require #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant