Commit Graph

11 Commits (eeea8929674872dcbb957f78556921a932700602)

Author SHA1 Message Date
Mike Gerwitz eeea892967 Exposed Evented#_hooksEvent as public #hooksEvent 2014-08-10 14:20:41 -04:00
Mike Gerwitz 66e3d5b1ef Prohibited duplicate listeners of the same event 2014-08-10 14:20:41 -04:00
Mike Gerwitz 875c43cee4 Added Evented#addListener as #on alias
Consistent with Node.js' event API
2014-08-10 14:20:41 -04:00
Mike Gerwitz 74ccbff716 Consistent terminology in Evented docblocks and tests 2014-08-10 14:20:41 -04:00
Mike Gerwitz 981d8b923a Evented#removeListener
As a conscious TODO: need to properly handle attaching the same event
listener multiple times (define its behavior), and maybe even provide an API
to configure that behavior in some way.
2014-08-10 14:20:41 -04:00
Mike Gerwitz 7baff379ce Using ES6 features through Traceur to cut down on verbosity
It will take some getting used to (and it's a little sad to see some of the
long-standing conventions of ECMAScript vanish before my eyes), but it's
great thus far.
2014-08-10 14:20:39 -04:00
Mike Gerwitz 2942f153db Evented trait with basic functionality
This provides the core of the trait, with support for event definitions and
hooks.
2014-08-10 14:20:09 -04:00
Mike Gerwitz 0d6a2fc652 util.types added
This spawned from a refactoring for the Eventable conformance test case;
these will be useful elsewhere.
2014-08-10 14:16:02 -04:00
Mike Gerwitz ef4040e13a Now using Traceur
The primary motivation behind this was the concise function syntax, but
other features like block-level scoping, templating, and variable object
keys are quite convenient. I'm sure I'll be using others in this project as
well.

This may raise the question: isn't it odd using something that provides
class support in a library that is intended to augment GNU ease.js, which is
itself a class framework? Well, no, not really: GNU ease.js provides many
more powerful features that ES6/7 do not, which will be showcased
extensively in this library. ease.js will still work well with native
EMCAScript and interop will be adjusted as needed, but ease.js will not
become irrelevant.
2014-08-10 14:16:02 -04:00
Mike Gerwitz 3944d439ec Began test/lib.js for testing patterns 2014-08-10 14:16:02 -04:00
Mike Gerwitz 2e953526e0 Added std.Array.isArray
This provides pre-ES5 compatibility without rudely modifying the prototype
of Array.
2014-08-10 14:16:00 -04:00