Returns true if all of the values in the list pass the predicate truth test. Stops early when a false element is found (official Underscore docs). Stable Collection helper — not deprecated.
Pass the required arguments shown below. Underscore collection helpers usually return a new value — check whether the source is mutated.
Syntax
Call _.every. Start with this line.
Underscore
_.every(list, [predicate], [context])
Call
What it does
_.every(list, [predicate], [context])
Primary signature.
_.every(...)
Call with the arguments your case needs.
Load Underscore with import _ from "underscore" (or the UMD CDN build) so these helpers are available as _.
Library declarations
Underscore
_.every(list, [predicate], [context])
Parameters
Parameter
Description
list
Required. Array, array-like, or plain object
predicate
Optional. Test; defaults to identity (truthy check)
context
Optional. Bound as this in the predicate
Return Value
Return Value
Description
*
true if all pass, else false
Underscore.js Examples
Example 1 — Official Docs Check
Ask whether every number is even — 5 fails the test.
Underscore
_.every([2, 4, 5], function (num) {
return num % 2 == 0;
});
// → false
Identity. Omitted predicate checks that each value is truthy.
0 fails. Falsy values make identity _.every return false.
Alias._.all is the same function as _.every.
Compatibility
Browser & Runtime Support
_.every (alias _.all) ships with Underscore.js (1.x). It runs anywhere Underscore runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install underscore.
✓ Stable · Underscore 1.x
_.every()
Available in [email protected] (UMD / ESM). Works in evergreen browsers and current Node LTS when Underscore is loaded.
100%With Underscore 1.x
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.everyUnderscore 1.x+
Bottom line: Safe for production once Underscore is on the page or in your bundle. Not a native browser API — load Underscore first. Prefer a pinned CDN version (e.g. [email protected]).
Frequently Asked Questions
_.every(list, [predicate], [context]) returns true only if all values pass the predicate. Official example: _.every([2, 4, 5], n => n % 2 == 0) → false.
Yes. all is an alias of every. They are the same function.
Yes. It short-circuits — as soon as one value fails, it stops and returns false.
_.every([]) returns true (vacuous truth): there is no failing element.
_.every needs all values to pass (AND). _.some needs at least one (OR).
Yes. Pass an object matcher, a property name string, or omit the predicate to test identity (all values truthy).