mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
feature(bower) emitify v1.3.0
This commit is contained in:
parent
50d698a985
commit
3e148bf4ec
16 changed files with 79 additions and 41 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "emitify",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"homepage": "https://github.com/coderaiser/emitify",
|
||||
"authors": [
|
||||
"coderaiser <mnemonic.enemy@gmail.com>"
|
||||
|
|
@ -23,13 +23,14 @@
|
|||
"test",
|
||||
"tests"
|
||||
],
|
||||
"_release": "1.2.0",
|
||||
"_release": "1.3.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.2.0",
|
||||
"commit": "5dd1685840ba4905c7fcbd7b00202bed4baeb1ad"
|
||||
"tag": "v1.3.0",
|
||||
"commit": "828df111561259b17cb3ec65aff7ab2228682b5b"
|
||||
},
|
||||
"_source": "git://github.com/coderaiser/emitify.git",
|
||||
"_target": "~1.2.0",
|
||||
"_originalSource": "emitify"
|
||||
"_target": "~1.3.0",
|
||||
"_originalSource": "emitify",
|
||||
"_direct": true
|
||||
}
|
||||
|
|
@ -1,3 +1,10 @@
|
|||
2015.09.30, v1.3.0
|
||||
|
||||
feature:
|
||||
- (travis) add
|
||||
- (emitify) add chaining
|
||||
|
||||
|
||||
2015.06.16, v1.2.0
|
||||
|
||||
feature:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Emitify
|
||||
# Emitify [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL]
|
||||
|
||||
Dead simple event emitter.
|
||||
|
||||
|
|
@ -51,8 +51,6 @@ var Emitify = require('emitify'),
|
|||
emitter.on('data', log);
|
||||
|
||||
emitter.emit('data', 'hello');
|
||||
// result
|
||||
'hello'
|
||||
|
||||
emitter.off('data', log);
|
||||
|
||||
|
|
@ -61,3 +59,13 @@ emitter.off('data', log);
|
|||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[NPMIMGURL]: https://img.shields.io/npm/v/emitify.svg?style=flat
|
||||
[BuildStatusIMGURL]: https://img.shields.io/travis/coderaiser/emitify/master.svg?style=flat
|
||||
[DependencyStatusIMGURL]: https://img.shields.io/gemnasium/coderaiser/emitify.svg?style=flat
|
||||
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
|
||||
[NPMURL]: https://npmjs.org/package/emitify "npm"
|
||||
[BuildStatusURL]: https://travis-ci.org/coderaiser/emitify "Build Status"
|
||||
[DependencyStatusURL]: https://gemnasium.com/coderaiser/emitify "Dependency Status"
|
||||
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "emitify",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"homepage": "https://github.com/coderaiser/emitify",
|
||||
"authors": [
|
||||
"coderaiser <mnemonic.enemy@gmail.com>"
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
var isTwo = arguments.length === 2;
|
||||
|
||||
if (typeof event !== 'string')
|
||||
throw(Error('event should be string!'));
|
||||
throw Error('event should be string!');
|
||||
|
||||
if (isTwo && typeof callback !== 'function')
|
||||
throw(Error('callback should be function!'));
|
||||
throw Error('callback should be function!');
|
||||
};
|
||||
|
||||
Emitify.prototype.on = function(event, callback) {
|
||||
|
|
@ -48,6 +48,8 @@
|
|||
callback();
|
||||
self.off(event, fn);
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Emitify.prototype.off = function(event, callback) {
|
||||
|
|
@ -60,6 +62,8 @@
|
|||
events.splice(index, 1);
|
||||
index = events.indexOf(callback);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Emitify.prototype.removeListener =
|
||||
|
|
@ -77,6 +81,8 @@
|
|||
});
|
||||
else if (event === 'error')
|
||||
throw args[0];
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
})(this);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"name": "emitify",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"description": "dead simple event emitter",
|
||||
"main": "lib/emitify.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -19,5 +19,8 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/coderaiser/emitify/issues"
|
||||
},
|
||||
"homepage": "https://github.com/coderaiser/emitify"
|
||||
"homepage": "https://github.com/coderaiser/emitify",
|
||||
"devDependencies": {
|
||||
"tape": "~4.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue