Changelog
v4.0.0
module.exports
and require
is good enough and can be compiled out.const
over var
, if you really need something to target an old browser etc use a transpiler or v3.0.0.Changelog
v3.0.0
The concept of _super
now works better, but in a completely different way. Thanks to @[vejersele][] in issue #9.
Changelog
v2.0.0
The inherit
method used to work by cloning and merging multiple prototypes into one. This meant things like instanceof
didn't work and you could get into some weird scenarios [caused by multiple inheritance][mi].
The new inherit
uses the built in prototypical inheritance to provide a much cleaner outcome, as shown in [this post about prototypical inheritance][pi]. The major change is that you can't inherit from multiple classes any more.
If you still need to have multiple things shared between classes to avoid duplication, you can now use the mixin
method to merge objects into your inheritance hierarchies where required.