Lodash Lang Methods

About This Index
This page is the Lodash Lang index for the tutorial track. Each row links to a full guide with syntax, examples, and FAQs.
Learn functions and collections on /lodash/function and /lodash/collection. Use this page when you need type checks or conversions such as _.isEqual(), _.cloneDeep(), or _.isNil().
Start with _.isEqual(), then _.cloneDeep(), _.isNil(), and _.isArray()—then browse convert helpers as needed.
How to Call a Lang Method
Pass a value (and any extra arguments) to the Lodash helper:
import _ from "lodash";
_.isArray([1, 2, 3]); // true
_.isNil(null); // true
_.isEqual({ a: 1 }, { a: 1 }); // true
const original = { nested: { n: 1 } };
const copy = _.cloneDeep(original);
copy.nested.n = 2;
// original.nested.n is still 1
_.toNumber("3.14"); // 3.14
_.toString([1, 2]); // "1,2"
_.castArray(1); // [1] Lodash Lang Methods Table
All lang method guides in this Lodash tutorial series (56 tutorials).
Clone & Cast
5 methodsShallow and deep clones, plus castArray for array wrapping.
| Method | Description | Tutorial |
|---|---|---|
_.castArray() | Wrap a value in an array unless it is already an array. | Try it |
_.clone() | Create a shallow clone of a value. | Try it |
_.cloneDeep() | Create a deep clone of a value recursively. | Try it |
_.cloneDeepWith() | Deep clone with a customizer for special cases. | Try it |
_.cloneWith() | Shallow clone with a customizer override. | Try it |
Compare & Match
10 methodsEquality, ordering, and partial object matching.
| Method | Description | Tutorial |
|---|---|---|
_.eq() | Compare two values with SameValueZero semantics. | Try it |
_.gt() | Check if the first value is greater than the second. | Try it |
_.gte() | Check if the first value is greater than or equal to the second. | Try it |
_.lt() | Check if the first value is less than the second. | Try it |
_.lte() | Check if the first value is less than or equal to the second. | Try it |
_.isEqual() | Perform a deep equality comparison. | Try it |
_.isEqualWith() | Deep equality comparison with a customizer. | Try it |
_.isMatch() | Check if an object partially matches source properties. | Try it |
_.isMatchWith() | Partial match check with a customizer. | Try it |
_.conformsTo() | Check if an object conforms to source predicates. | Try it |
Nullish & Empty
4 methodsNull, undefined, nil, and empty checks.
| Method | Description | Tutorial |
|---|---|---|
_.isNil() | Check if a value is null or undefined. | Try it |
_.isNull() | Check if a value is null. | Try it |
_.isUndefined() | Check if a value is undefined. | Try it |
_.isEmpty() | Check if a collection, map, set, or object is empty. | Try it |
Core Type Checks
9 methodsCommon primitives and object shapes.
| Method | Description | Tutorial |
|---|---|---|
_.isArray() | Check if a value is an array. | Try it |
_.isBoolean() | Check if a value is classified as a boolean. | Try it |
_.isFunction() | Check if a value is classified as a function. | Try it |
_.isNumber() | Check if a value is classified as a number. | Try it |
_.isString() | Check if a value is a string. | Try it |
_.isObject() | Check if a value is the language type of Object. | Try it |
_.isObjectLike() | Check if a value is object-like (not null, typeof object). | Try it |
_.isPlainObject() | Check if a value is a plain object. | Try it |
_.isSymbol() | Check if a value is a symbol. | Try it |
Number Quality
5 methodsFinite, integer, safe integer, NaN, and length checks.
| Method | Description | Tutorial |
|---|---|---|
_.isFinite() | Check if a value is a finite primitive number. | Try it |
_.isInteger() | Check if a value is an integer. | Try it |
_.isSafeInteger() | Check if a value is a safe integer. | Try it |
_.isNaN() | Check if a value is NaN (number only). | Try it |
_.isLength() | Check if a value is a valid array-like length. | Try it |
Built-in Type Checks
15 methodsArrays, maps, sets, dates, errors, buffers, and related types.
| Method | Description | Tutorial |
|---|---|---|
_.isArguments() | Check if a value is likely an arguments object. | Try it |
_.isArrayBuffer() | Check if a value is an ArrayBuffer. | Try it |
_.isArrayLike() | Check if a value is array-like (has length, not a function). | Try it |
_.isArrayLikeObject() | Check if a value is object-like and array-like. | Try it |
_.isBuffer() | Check if a value is a Node.js Buffer. | Try it |
_.isDate() | Check if a value is a Date object. | Try it |
_.isElement() | Check if a value is likely a DOM element. | Try it |
_.isError() | Check if a value is an Error object. | Try it |
_.isMap() | Check if a value is a Map object. | Try it |
_.isSet() | Check if a value is a Set object. | Try it |
_.isWeakMap() | Check if a value is a WeakMap object. | Try it |
_.isWeakSet() | Check if a value is a WeakSet object. | Try it |
_.isRegExp() | Check if a value is a RegExp object. | Try it |
_.isTypedArray() | Check if a value is a typed array. | Try it |
_.isNative() | Check if a value appears to be a native function. | Try it |
Convert
8 methodsNormalize values to arrays, numbers, strings, and plain objects.
| Method | Description | Tutorial |
|---|---|---|
_.toArray() | Convert a value to an array. | Try it |
_.toFinite() | Convert a value to a finite number. | Try it |
_.toInteger() | Convert a value to an integer. | Try it |
_.toLength() | Convert a value to a valid array-like length. | Try it |
_.toNumber() | Convert a value to a number. | Try it |
_.toPlainObject() | Convert a value to a plain object flattening inherited props. | Try it |
_.toSafeInteger() | Convert a value to a safe integer. | Try it |
_.toString() | Convert a value to a string. | Try it |
Frequently Asked Questions
Start with _.isEqual()
Open the deep equality guide—syntax, examples, and FAQs.
14 people found this page helpful
