Lodash Seq Methods

About This Index
This page is the Lodash Seq index for the tutorial track. Each row links to a full guide with syntax, examples, and FAQs.
Seq is Lodash method chaining. Start with _.chain() or _(value), call collection/array/object helpers, then unwrap with .value().
Start with _.chain(), add a few steps like map and filter, finish with .value()—then learn _.tap() and _.thru().
How to Chain Lodash Methods
Wrap with _.chain(), keep calling methods, then unwrap with .value():
import _ from "lodash";
const users = [
{ user: "barney", age: 36 },
{ user: "fred", age: 40 },
{ user: "pebbles", age: 1 }
];
const youngest = _.chain(users)
.sortBy("age")
.map(function (o) {
return o.user + " is " + o.age;
})
.head()
.value();
// "pebbles is 1"
// Side effect vs transform
_.chain([1, 2, 3])
.tap(function (array) { array.pop(); })
.reverse()
.value();
// [2, 1] Lodash Seq Methods Table
All seq method guides in this Lodash tutorial series (12 tutorials).
Getting Started
2 methodsStart a Lodash sequence with _.chain() or _(value).
Pipeline Helpers
2 methodsSide effects with tap, transforms with thru.
Unwrap & Control
3 methodsFinish the pipeline and control wrapper execution.
Wrapper Methods
5 methodsPrototype helpers for iteration, reverse, at, and chaining mode.
| Method | Description | Tutorial |
|---|---|---|
Wrapper prototype | Overview of methods on the Lodash chain wrapper object. | Try it |
.next() | Advance lazy iteration on wrapped sequences (iterator protocol). | Try it |
.reverse() | Reverse the wrapped array in place inside the chain. | Try it |
.at() | Create a slice of the wrapped collection for the given paths or indexes. | Try it |
.chain() | Enable explicit chaining on an existing wrapper. | Try it |
Frequently Asked Questions
Start with _.chain()
Open the chaining guide—syntax, examples, and FAQs.
CODETOFUN NEWS
Stay Ahead in Tech
Get the latest IT news, programming updates, and technology trends directly on your phone.
Your daily dose of tech, straight to your feed.
12 people found this page helpful
