Skip to content
Browse files

Release 0.1.0

  • Loading branch information...
1 parent 4a6cf09 commit 9bd0291d3c3629d1d3120765ec137ae8c4191aa2 @tj tj committed Dec 18, 2012
Showing with 18 additions and 7 deletions.
  1. +5 −0 History.md
  2. +4 −2 Readme.md
  3. +2 −2 component.json
  4. +5 −1 index.js
  5. +2 −2 package.json
View
5 History.md
@@ -0,0 +1,5 @@
+
+0.1.0 / 2012-12-18
+==================
+
+ * add returning of the callback function
View
6 Readme.md
@@ -26,11 +26,13 @@ events.bind(a, 'click', onclick);
### .bind(el, type, callback, [capture])
- Bind to `el`'s event `type` with `callback`.
+ Bind to `el`'s event `type` with `callback`,
+ returns the `callback` passed.
### .unbind(el, type, callback, [capture])
- Unbind `el`'s event `type` `callback`.
+ Unbind `el`'s event `type` `callback`,
+ returns the `callback` passed.
## License
View
4 component.json
@@ -2,9 +2,9 @@
"name": "event",
"repo": "component/event",
"description": "Event binding component",
- "version": "0.0.1",
+ "version": "0.1.0",
"keywords": ["event", "events"],
"scripts": [
"index.js"
]
-}
+}
View
6 index.js
@@ -6,6 +6,7 @@
* @param {String} type
* @param {Function} fn
* @param {Boolean} capture
+ * @return {Function}
* @api public
*/
@@ -15,6 +16,7 @@ exports.bind = function(el, type, fn, capture){
} else {
el.attachEvent('on' + type, fn);
}
+ return fn;
};
/**
@@ -24,6 +26,7 @@ exports.bind = function(el, type, fn, capture){
* @param {String} type
* @param {Function} fn
* @param {Boolean} capture
+ * @return {Function}
* @api public
*/
@@ -33,4 +36,5 @@ exports.unbind = function(el, type, fn, capture){
} else {
el.detachEvent('on' + type, fn);
}
-};
+ return fn;
+};
View
4 package.json
@@ -2,11 +2,11 @@
"name": "event-component",
"repo": "component/event",
"description": "Event binding component",
- "version": "0.0.1",
+ "version": "0.1.0",
"keywords": ["event", "events"],
"component": {
"scripts": {
"event/index.js": "index.js"
}
}
-}
+}

0 comments on commit 9bd0291

Please sign in to comment.
Something went wrong with that request. Please try again.