Lodash Seq Methods

Beginner
5 min read
Updated: Nov 2026
12 method guides
Method index

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().

Beginner path.

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():

Lodash
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 methods

Start a Lodash sequence with _.chain() or _(value).

MethodDescriptionTutorial
_.chain()Wrap a value so Lodash methods stay fluent until .value().Try it
_(value)Shorthand entry point—wrap a value the same way as _.chain().Try it

Pipeline Helpers

2 methods

Side effects with tap, transforms with thru.

MethodDescriptionTutorial
_.tap()Run a side-effect function, then pass the original value through unchanged.Try it
_.thru()Pass the current value through a function and continue with its return value.Try it

Unwrap & Control

3 methods

Finish the pipeline and control wrapper execution.

MethodDescriptionTutorial
.value()Execute the chain and return the unwrapped result (alias: valueOf).Try it
.commit()Execute pending chain actions and return the wrapper.Try it
.plant()Clone the chain with a new wrapped value at the same stage.Try it

Wrapper Methods

5 methods

Prototype helpers for iteration, reverse, at, and chaining mode.

MethodDescriptionTutorial
Wrapper prototypeOverview 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

Seq is Lodash's chaining category. _.chain(value) wraps data so you can call map, filter, pick, and other methods in a fluent pipeline, then unwrap with .value().
Both create a Lodash wrapper. _.chain(value) is explicit; _(value) is the shorthand entry point—they behave the same for starting a sequence.
Intermediate chain steps return a wrapper object, not the plain result. .value() (or .valueOf()) executes the pipeline and returns the underlying JavaScript value.
_.tap() runs a side-effect function but passes the original value onward. _.thru() passes the value through a function and continues with whatever that function returns.
Start with _.chain(), practice a short map/filter pipeline, then finish with .value(). Open _.tap() and _.thru() next.

Start with _.chain()

Open the chaining guide—syntax, examples, and FAQs.

_.chain() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful