- Fixed bug that doesn't take in account the length of the current created function
- Fixed bug that makes
$include
apply descriptors correctly - Added composition test
- BEHAVIOR MIGHT CHANGE WHEN IMPLEMENTING/INCLUDING FUNCTIONS
- Changes to documentation, mostly
README.md
- Fixed bug that makes
$implement
apply descriptors correctly - Performance tweaks
- Add
$wrap
method, makes any function or object an ES5Class - Add
$const
for Object.definePropertywritable: false
- Improve
new
and$create
operators performance
- Tests for the browser, change mocha to bdd. Testling doesn't work, but
index.html
test works - Bump internal version
- 100% test coverage
$className
available in instance as well
- Fix tests for Travis and Testling
- Drop Node.js 0.8 support
- Bump version for major API changes and isn't backwards compatible
- Rewrite some tests
- 100% test coverage
README.md
changes- Better documentation
- Added
better-curry
dependency for performance reasons and utility - Added UMD pattern and
bower.json
- Fix
$instanceOf
- Changes in JSDOC
- Implement
$names
(shortcut forObject.getOwnPropertyNames(this)
) - Added
$inherit
for importing another class completely, but with separated arguments - Class
$implements
must be unique - Fix
constructor
member of class - Removed deprecated code (
create
,implement
,define
,include
) $super
injection now supports async operations, but it's not backward compatible
- Fix test for new expect version
- Added coverage badge
- Declarations on prototype should be deletable by default. If you must, use Object.defineProperty inside your construct
- Implemented $destroy to ensure there are NO traces of references in the instance
- Minor performance improvements
- Getters and setter should retain their properties (enumerable, configurable, etc)
- Added $import, you can mixin to the class after it been instantiated
- Made "non dollar" functions deprecated (and they can be overriden, the $ functions can't, that is, $define, $implement, $include, $create). The reason is to avoid collisions when extending other classes that you do not own
- Implemented $exchange, you can change the current instance proto to something else on-the-fly
- Named functions to be easier to spot bugs on stack
- Fix getter and setters by using getOwnPropertyDescriptor (defineGetter and defineSetter)
- Fix crash when trying to call an object as a parent constructor
- Fix edge case where other classes were using proto and it wasn't being imported to the prototype
- Fix
implement
code for arrays - Inheritance now works with classes like Node.js
Buffer
, that has auto instantiation code, without the need of usingnew
operator - The
new
operator was missing some steps, needed to replicateES5Class.create
code - More tests regarding the
new
operator, should be enough for now - Performance went through the roof with more optimizations
- Fix
Object.create(null)
for node 0.11 bug
implement
can now apply node.js native instance super calls, by passing true as the second argument, automatically
- Many minor performance tweaks (that in benchmarks are important) according to jsperf benchmarks
- Version 1.0.0 got breaking API changes, because the behavior of mixins has changed (now properly applies instance and class methods separately)
- Added more tests and made some changes to existing ones
- This branch uses
__proto__
/Object.setPrototypeOf
(when available) instead ofObject.create
, so the next change item could happen - The class can be auto instantiated using
MyClass(instance, values)
,MyClass.create(instance, values)
and using thenew
operator
- Fixed specific EventEmitter code for node 0.8
- Fixed code for node 0.11 and 0.8
- Fixed
implement
when importing other classes likeEventEmitter
- Changed code to strict
- Changed the way the prototype of functions and objects are cloned
- Readme and more tests
- Fixed mixin injection when using
define
- Added a new test and reordered
README.md
, added JsDocs in source
- Forgot to update
README.md
to the new code
- Renamed class inside file to
ES5Class
for obvious reasons - Changed
extend
todefine
(makes more sense) - Fixed memory leak on
Object.create
- Change
nodeunit
tomocha
- Fixed
Maximum call stack size exceeded
when extending classes - When passing a closure to the function, the argument passed is the
$parent
forimplement
and$parent.prototype
forinclude
- Changed library to
index.js
, since not usinglib
folder ormain
inpackage.json
- Minor
README.md
modification and addedkeywords
- Moar performance increases on
$super
functionWrapper according to this jsperf
- Increased performance on
$super
calls by at least 40% and up to 476%
- Added
$super
to Class method calls