Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Return true when calling _.all on empty array. #5

wants to merge 1 commit into from

2 participants


This is the expected behavior when using underscore.js.


Thanks for the pull request! I'll add a test case for this and merge it soon. Right now I'm just getting back into working condition after a hurricane knocked out power to half of Manhattan.

@amacdougall amacdougall closed this pull request from a commit
@amacdougall Merge remote-tracking branch 'jiaweihli/master'
Fixes #5, satisfying pull request 5.

Done! Sorry it took me so long to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 25, 2012
  1. @jiaweihli
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/com/alanmacdougall/underscore/
2  src/com/alanmacdougall/underscore/
@@ -202,7 +202,7 @@ public var _:* = (function():Function {
* iterator is omitted, tests the elements themselves for truthiness.
_.all = function(obj:*, iterator:Function = null, context:Object = null):Boolean {
- if (obj == null || _(obj).isEmpty()) return false;
+ if (obj == null) return false;
// TO DO: benchmark native Array.every
iterator = iterator || identity;
var result:Boolean = true;
Something went wrong with that request. Please try again.