By the end of this tutorial, you’ll use Lodash’s _.over() to run several functions on the same arguments and collect their results in one array.
01
Core Syntax
_.over([iteratees])
02
Same args
Every fn gets inputs.
03
Array out
Results in order.
04
Not flow
Parallel, not pipe.
05
Shorthands
Property strings OK.
06
vs overEvery
Array vs boolean.
Fundamentals
What Is _.over()?
_.over(iteratees) builds a fan-out function. Call it once with any arguments; Lodash forwards those exact arguments to each iteratee and returns [result₁, result₂, …].
💡
Beginner tip — parallel views, not a pipeline
_.over([square, cube])(3) gives [9, 27]—both functions receive 3. That is different from _.flow([square, cube])(3), which would pipe 9 into cube. Do not confuse over with flow (the old reference did).
Use over when one input should produce several derived values—statistics, geometry metrics, or multiple property picks from the same object.
Foundation
📝 Syntax
Pass an array of iteratees (functions or shorthands):
javascript
_.over([iteratees = [_.identity]])
Syntax Rules
iteratees — array of functions; defaults to [_.identity].
Return value — a new function that returns an array of iteratee results.
Same arguments — every iteratee receives the full argument list from the outer call.
Order preserved — result array matches iteratee order.
Shorthands — property strings and other Lodash iteratee forms work in the list.
javascript
import over from "lodash/over";
const minMax = over([Math.min, Math.max]);
minMax(1, 2, 3, 4);
// [1, 4]
Cheat Sheet
⚡ Quick Reference
Task
Code pattern
Notes
Min + max
_.over([Math.min, Math.max])(...n)
Official example
Two transforms
_.over([square, cube])(3)
[9, 27]
Pick properties
_.over(['name', 'age'])(user)
Shorthand
With nthArg
_.over([_.nthArg(0), _.nthArg(1)])
Arg pickers
Default
_.over()(x)
[x] identity
Pipeline
_.flow([f, g])
Not over
Returns
Function
Fan-out fn
Output
Array
All results
Related
overEvery
All truthy
Category
Util
Function
Reference
🧰 Parameters
Arguments to _.over() and the combinator it returns:
iterateesOptional
Array of functions (or iteratee shorthands) to invoke. Defaults to [_.identity].
_.over([fn1, fn2])
returned fnCombinator
Variadic: forwards all received arguments to each iteratee.
combo(a, b, c)
result arrayOrdered
Index i holds the return value of iteratees[i].
[r0, r1, r2]
errorsPropagates
If one iteratee throws, the whole call throws—there is no partial result array.
try / catch
For boolean “all pass” or “any pass” checks on predicates, use _.overEvery() or _.overSome() instead.
Hands-On
Examples Gallery
Practical _.over() patterns with copy-ready code, sample output, and interactive Try It Yourself labs.
📚 Getting Started
Official min/max pattern and basic transforms.
Example 1 — Min and max together
Lodash docs example with built-in Math.min and Math.max.
Natural pairing from the nthArg tutorial—over collects what each picker returns.
🚀 Beyond the Basics
over vs flow—and when predicates belong elsewhere.
Example 6 — over vs _.flow (fixing a common mistake)
Same iteratees, different combinators—very different results.
javascript
const inc = (n) => n + 1;
const dbl = (n) => n * 2;
console.log(_.over([inc, dbl])(3));
// [4, 6] — both get 3
console.log(_.flow([inc, dbl])(3));
// 8 — inc(3)=4, then dbl(4)=8
📤 Console output:
[4, 6]
8
How It Works
The old reference suggested _.flow for an “over-style pipeline”—that is sequential composition. Use _.over when you want every result, not the final piped value.
Compare
📋 _.over vs related patterns
Topic
_.over()
_.overEvery()
_.overSome()
_.flow()
Return type
Array of results
Boolean (all truthy)
Boolean (any truthy)
Final piped value
Iteratee role
Any function
Predicates
Predicates
Transform fns
Args to each fn
Same full arg list
Same full arg list
Same full arg list
Output → next input
Typical use
Multiple metrics
Validation (all rules)
Validation (any rule)
Data pipeline
Example
[max, min]
all checks pass
one check passes
parse → trim
🧠 How _.over() Works
1
Normalize iteratees
Lodash converts shorthands to functions and defaults to [_.identity].
Setup
2
Return combinator
The new function waits for arguments from your call site.
Factory
3
Fan-out invoke
Each iteratee runs with the same argument list; results push into an array.
Execute
=
🛠
Result array
Ordered values—one slot per iteratee.
Important
📝 Notes
_.over is parallel fan-out—not sequential like _.flow().
Result order matches iteratee order—document which index means what.
Default iteratees [_.identity] wrap a single value: _.over()(x) → [x].
If any iteratee throws, the entire combinator throws—wrap risky iteratees if needed.
For “all predicates true” use overEvery; for “any true” use overSome.
Next in the series: _.overEvery()—boolean all-check combinator.
Wrap Up
Conclusion
_.over() runs several iteratees on the same arguments and hands back every result in one array—ideal for multi-metric helpers and multi-field picks.
Keep it separate from _.flow (pipe) and from predicate combinators (overEvery / overSome). Choose the combinator that matches the shape of answer you need.
Use over when you only need a boolean—use overEvery/overSome
Pass unrelated iteratees without documenting index meaning
Assume parallel means async—over is synchronous unless iteratees are async
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about _.over()
Use these points when fanning out to multiple iteratees.
5
Core concepts
📦01
Fan-out
Same args.
Basics
🗃02
Array
All results.
Output
🔄03
Not flow
No piping.
Compare
📝04
Shorthands
Property picks.
Iteratee
🛠05
overEvery
Predicates next.
Related
❓ Frequently Asked Questions
_.over(iteratees) returns a new function. When you call it with arguments, Lodash runs every iteratee with those same arguments and returns an array of each result—in order.
No. _.over runs all iteratees on the same inputs in parallel and returns [result1, result2, ...]. _.flow pipes output of one function into the next. The old tutorial wrongly used flow for an 'over pipeline'—use flow for sequences, over for multiple views of the same args.
Lodash defaults to [_.identity]—_.over()(value) returns [value].
Pass an array: _.over([fn1, fn2]). You can also use iteratee shorthands (property strings, matches objects) like other Lodash APIs—each shorthand becomes a function in the list.
_.over collects every result in an array. _.overEvery returns true only if all predicates are truthy. _.overSome returns true if any predicate is truthy.
Use it when one input should produce several derived values at once—min and max together, area and perimeter, or multiple property picks from the same object.
Did you know?
The official Lodash example uses Math.max and Math.min because both are variadic—_.over([Math.max, Math.min])(1,2,3,4) returns [4, 1] without writing custom min/max wrappers.