https://github.com/ymichael/js
https://github.com/ymichael/js
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/ymichael/js
- Owner: ymichael
- License: mit
- Created: 2014-05-13T17:07:28.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-16T23:44:39.000Z (about 12 years ago)
- Last Synced: 2025-01-11T04:41:18.403Z (over 1 year ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# js
Simple implementations of basic javascript constructs.
An excuse to try out `karma` and writing unit tests in javascript.
## Modules
- EventEmitter
## Examples
// EventEmitter
var ee = EventEmitter();
var foo = 0;
var handleFoo = function() {
foo += 1;
};
ee.on('foo', handleFoo);
ee.emit('foo');
// foo = 1
ee.off('foo', handleFoo);
ee.emit('foo')
// foo = 1
## Run tests
$ npm install
$ make tests