Skip to content

Commit

Permalink
Merge pull request #18 from pirxpilot/aliases
Browse files Browse the repository at this point in the history
Add aliases (forEach === each, filter === select)
  • Loading branch information
tj committed Jan 19, 2013
2 parents d302fc2 + 2f16d53 commit 379fb76
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Enumerable.prototype.__iterate__ = function(){
* @api public
*/

proto.forEach =
proto.each = function(fn){
var vals = this.__iterate__();
var len = vals.length();
Expand Down Expand Up @@ -148,6 +149,7 @@ proto.map = function(fn){
* @api public
*/

proto.filter =
proto.select = function(fn){
fn = toFunction(fn);
var val;
Expand Down

0 comments on commit 379fb76

Please sign in to comment.