Skip to content
A modern JavaScript utility library delivering modularity, performance, & extras.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.internal Use 3 equal signs (#4153) Jan 16, 2019
test
.editorconfig Define trim_trailing_whitespace rule for all files. Jan 27, 2016
.eslintrc.js Enable no-unexpected-multiline (#3103) Apr 12, 2017
.gitattributes Simplify .gitattributes. [ci skip] May 19, 2014
.gitignore Ignore log files that end with random numbers (#3445) Oct 23, 2017
CHANGELOG Simplify changelog reference. [ci skip] Sep 15, 2016
LICENSE Update license file with MIT title (#3498) Nov 18, 2017
README.md
add.js Remove semicolons. Feb 6, 2017
after.js
at.js Added arrow function in below files (#4061) Nov 18, 2018
attempt.js Added arrow function in below files (#4061) Nov 18, 2018
before.js Remove coercion method use. Mar 14, 2017
camelCase.js
capitalize.js
castArray.js Remove semicolons. Feb 6, 2017
ceil.js add round up description on ceil documentation (#4027) Oct 28, 2018
chunk.js Remove `baseSlice`. Apr 18, 2017
clamp.js Remove coercion method use. Mar 14, 2017
clone.js tweak _.clone/_.cloneDeep docs (#4239) Mar 18, 2019
cloneDeep.js
cloneDeepWith.js Add the accepted customizer arguments to cloneDeepWith docs. Jan 14, 2018
cloneWith.js
compact.js Use more for-of Apr 5, 2017
cond.js Fixin new `map` imports. Apr 18, 2017
conforms.js Remove semicolons. Feb 6, 2017
conformsTo.js Remove semicolons. Feb 6, 2017
countBy.js Update countBy doc example to be more at a glance friendly. [closes #… May 1, 2018
create.js Remove `baseCreate`. Feb 6, 2017
debounce.js Cancel old timer, editing pr #4139 (#4187) Feb 12, 2019
deburr.js Add extended and supplement combining marks ranges (#3932) Sep 2, 2018
defaultTo.js Remove semicolons. Feb 6, 2017
defaultToAny.js use extension resolution (#4163) Jan 20, 2019
defaults.js Remove `baseKeys` and `baseKeysIn`. Apr 16, 2017
defaultsDeep.js Remove `apply`. Feb 25, 2017
defer.js Remove semicolons. Feb 6, 2017
delay.js Remove coercion method use. Mar 14, 2017
difference.js Remove semicolons. Feb 6, 2017
differenceBy.js Remove semicolons. Feb 6, 2017
differenceWith.js Remove semicolons. Feb 6, 2017
divide.js Remove semicolons. Feb 6, 2017
drop.js Remove `baseSlice`. Apr 18, 2017
dropRight.js Remove semicolons from `dropRight`. Oct 16, 2017
dropRightWhile.js Use consistent nullish check for `array`. Mar 1, 2017
dropWhile.js
each.js
eachRight.js Remove semicolons. Feb 6, 2017
endsWith.js Fixin some leftovers bb7c959. Mar 15, 2017
eq.js Remove semicolons. Feb 6, 2017
eqDeep.js Remove semicolons. Feb 6, 2017
escape.js Remove `toString` coercion method use. Mar 15, 2017
escapeRegExp.js Revert "Fix typo in `escapeRegExp` (#3448)" Nov 8, 2017
every.js
everyValue.js
filter.js
filterObject.js
findKey.js
findLast.js Fix findLast missing dependency (#4259) Apr 14, 2019
findLastIndex.js Remove coercion method use. Mar 14, 2017
findLastKey.js
first.js
flatMap.js
flatMapDeep.js Remove semicolons. Feb 6, 2017
flatMapDepth.js
flatten.js Remove semicolons. Feb 6, 2017
flattenDeep.js Remove semicolons. Feb 6, 2017
flattenDepth.js
flip.js Simplify `flip`. Mar 24, 2017
floor.js
flow.js Use “composes” to describe flow/flowRight. [closes #2979] Feb 7, 2017
flowRight.js
forEach.js
forEachRight.js
forOwn.js
forOwnRight.js Fixin assignment to constant. Mar 6, 2017
fromEntries.js Create fromEntries.js (#3809) Jun 1, 2018
functions.js Remove constant function from examples (#3086) Mar 30, 2017
get.js Remove semicolons. Feb 6, 2017
groupBy.js Missing iteratee call in `groupBy` and `keyBy`. Feb 21, 2017
gt.js
gte.js
has.js
hasIn.js Simplify `has` and `hasIn`. Feb 27, 2017
hasPath.js Fixin scope range for var declarations in `hasPath` and `hasPathIn`. Apr 4, 2017
hasPathIn.js Fixin scope range for var declarations in `hasPath` and `hasPathIn`. Apr 4, 2017
head.js Adjust styling of array checks in `head`, `uniq`, `uniqBy` and `uniqW… Mar 16, 2017
inRange.js Fix typo in `inRange` (#3478) Nov 6, 2017
indexOf.js Remove coercion method use. Mar 14, 2017
initial.js Remove `baseSlice`. Apr 18, 2017
intersection.js Fixin new `map` imports. Apr 18, 2017
intersectionBy.js Fixin new `map` imports. Apr 18, 2017
intersectionWith.js Fixin new `map` imports. Apr 18, 2017
invert.js Fixin loop args order regression from 3c2795b in `invert`. Jul 14, 2017
invertBy.js Fixin loop args order regression from 3c2795b in `invertBy`. Jul 14, 2017
invoke.js Remove `apply`. Feb 25, 2017
invokeMap.js Use the `new` operator with the `Array` constructor. Mar 8, 2017
isArguments.js use extension resolution (#4163) Jan 20, 2019
isArrayBuffer.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isArrayLike.js
isArrayLikeObject.js
isBoolean.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isBuffer.js
isDate.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isElement.js
isEmpty.js
isEqualWith.js Remove semicolons. Feb 6, 2017
isError.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isFunction.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isLength.js Remove semicolons. Feb 6, 2017
isMap.js internal: use util.types to migrate DEP0103 in Node.js (#3704) Mar 23, 2018
isMatch.js Remove semicolons. Feb 6, 2017
isMatchWith.js Remove semicolons. Feb 6, 2017
isNative.js Remove `toSource`. Apr 9, 2017
isNil.js
isNull.js
isNumber.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isObject.js
isObjectLike.js Update object checks. Apr 24, 2017
isPlainObject.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isRegExp.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isSet.js use extension resolution (#4163) Jan 20, 2019
isString.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isSymbol.js Replace getTag implementation by the one from baseGetTag (remove work… Dec 11, 2018
isTypedArray.js
isUndefined.js Remove semicolons. Feb 6, 2017
isWeakMap.js use extension resolution (#4163) Jan 20, 2019
isWeakSet.js use extension resolution (#4163) Jan 20, 2019
kebabCase.js Adjust spacing in template string expressions. Apr 9, 2017
keyBy.js
keys.js Remove `baseKeys` and `baseKeysIn`. Apr 16, 2017
keysIn.js Locally scope key in keysIn (#4173) Jan 27, 2019
last.js Remove semicolons. Feb 6, 2017
lastIndexOf.js
lowerCase.js Tiny performance improvement by not compiling regular expression each… Nov 7, 2017
lowerFirst.js
lt.js
lte.js Remove coercion method use. Mar 14, 2017
map.js
mapKey.js Fix object coercion. Apr 16, 2017
mapObject.js Fix typos. Apr 16, 2017
mapValue.js Fix object coercion. Apr 16, 2017
matches.js
matchesProperty.js Remove semicolons. Feb 6, 2017
maxBy.js Fix _.maxBy and _.minBy (#4233) Mar 12, 2019
mean.js
meanBy.js Remove semicolons. Feb 6, 2017
memoize.js
merge.js Remove semicolons. Feb 6, 2017
mergeWith.js
method.js Remove constant function from examples (#3086) Mar 30, 2017
methodOf.js Remove constant function from examples (#3086) Mar 30, 2017
minBy.js Fix _.maxBy and _.minBy (#4233) Mar 12, 2019
multiply.js
negate.js Remove semicolons. Feb 6, 2017
nth.js Remove coercion method use. Mar 14, 2017
nthArg.js Remove `baseNth`. Mar 13, 2017
once.js Remove semicolons. Feb 6, 2017
orderBy.js Allow compareMultiple to accept compare functions in addition to orde… May 1, 2018
over.js
overArgs.js Remove `apply`. Feb 25, 2017
overEvery.js
overSome.js Fixin `some` and `every` imports. Apr 18, 2017
package-lock.json
package.json
pad.js Update _.pad* examples to show pad length < string. (#3088) Mar 30, 2017
padEnd.js Update _.pad* examples to show pad length < string. (#3088) Mar 30, 2017
padStart.js
parseInt.js Remove `map` examples from `parseInt` and `trim` (#3487) Nov 10, 2017
partition.js Fixin missing accumulator return in reduce and predicate call in `par… Feb 18, 2017
pick.js Remove semicolons. Feb 6, 2017
pickBy.js
property.js Remove semicolons. Feb 6, 2017
propertyOf.js Consistent use (always) of parentheses in arrow functions. Mar 7, 2017
pull.js
pullAll.js Use consistent nullish check for `array`. Mar 1, 2017
pullAllBy.js
pullAllWith.js Use consistent nullish check for `array`. Mar 1, 2017
pullAt.js
random.js Adjust spacing in template string expressions. Apr 9, 2017
range.js Clarify doc for `range` usage with single arg (#3854) Jun 28, 2018
rangeRight.js Remove semicolons. Feb 6, 2017
reduce.js Remove semicolons. Feb 6, 2017
reduceRight.js Remove semicolons. Feb 6, 2017
reject.js
remove.js Use more destructuring. Mar 13, 2017
repeat.js Math them all. Apr 4, 2017
replace.js Adjust spacing in template string expressions. Apr 9, 2017
result.js Remove constant function from examples (#3086) Mar 30, 2017
round.js
sample.js Simplify `shuffle` and `sample`. Feb 7, 2017
sampleSize.js Remove semicolons from `sampleSize` and `baseClone` May 15, 2018
set.js Remove semicolons. Feb 6, 2017
setWith.js Remove semicolons. Feb 6, 2017
shuffle.js
size.js Remove `baseKeys` and `baseKeysIn`. Apr 16, 2017
slice.js
snakeCase.js add snakeCase example with digit (#3993) Oct 8, 2018
some.js Fix jsdoc for `every` and `some`. Apr 16, 2017
someValue.js Fix object coercion. Apr 16, 2017
sortedIndex.js Remove semicolons. Feb 6, 2017
sortedIndexBy.js
sortedIndexOf.js Remove semicolons. Feb 6, 2017
sortedLastIndex.js Remove semicolons. Feb 6, 2017
sortedLastIndexBy.js
sortedLastIndexOf.js Remove semicolons. Feb 6, 2017
sortedUniq.js Remove trailing space in `sortedUniq`. Oct 16, 2017
sortedUniqBy.js Use consistent nullish check for `array`. Mar 1, 2017
split.js Remove `toString` coercion method use. Mar 15, 2017
startCase.js
startsWith.js Adjust spacing in template string expressions. Apr 9, 2017
subtract.js Remove semicolons. Feb 6, 2017
sum.js Consistent use (always) of parentheses in arrow functions. Mar 7, 2017
sumBy.js Use consistent nullish check for `array`. Mar 1, 2017
tail.js Remove unused var from tail(). Jun 15, 2018
take.js Remove `baseSlice`. Apr 18, 2017
takeRight.js Remove `baseSlice`. Apr 18, 2017
takeRightWhile.js Use consistent nullish check for `array`. Mar 1, 2017
takeWhile.js
throttle.js Change type check and the way of sending params. (#4145) Jan 11, 2019
times.js Remove constant function from examples (#3086) Mar 30, 2017
toArray.js
toFinite.js Remove semicolons. Feb 6, 2017
toInteger.js Fix #3466 (#3467) Nov 2, 2017
toLength.js Remove `baseClamp`. Mar 12, 2017
toNumber.js Adjust spacing in template string expressions. Apr 9, 2017
toPath.js
toPlainObject.js Fix typo in toPlainObject(). Apr 15, 2019
toSafeInteger.js Remove `baseClamp`. Mar 12, 2017
toString.js Assume Symbol is always defined (#4111) Dec 11, 2018
transform.js Remove `isFunction` use. Feb 25, 2017
trim.js Remove `map` examples from `parseInt` and `trim` (#3487) Nov 10, 2017
trimEnd.js
trimStart.js Remove `toString` coercion method use. Mar 15, 2017
truncate.js Adjust spacing in template string expressions. Apr 9, 2017
unescape.js Remove `toString` coercion method use. Mar 15, 2017
union.js
unionBy.js Remove semicolons. Feb 6, 2017
unionWith.js Remove semicolons. Feb 6, 2017
uniq.js Adjust styling of array checks in `head`, `uniq`, `uniqBy` and `uniqW… Mar 16, 2017
uniqBy.js Adjust styling of array checks in `head`, `uniq`, `uniqBy` and `uniqW… Mar 16, 2017
uniqWith.js
uniqueId.js
unset.js Remove semicolons. Feb 6, 2017
unzip.js Fixin `filter` imports. Apr 20, 2017
unzipWith.js Fixin new `map` imports. Apr 18, 2017
update.js _.update() docs grammar fix (#3264) Jul 17, 2017
updateWith.js Remove constant function from examples (#3086) Mar 30, 2017
upperCase.js Adjust spacing in template string expressions. Apr 9, 2017
upperFirst.js Remove semicolons. Feb 6, 2017
values.js Remove semicolons. Feb 6, 2017
without.js Remove semicolons. Feb 6, 2017
words.js
xor.js Use native filter instead of custom one where possible (#4116) Dec 11, 2018
xorBy.js Use native filter instead of custom one where possible (#4116) Dec 11, 2018
xorWith.js
zip.js
zipObject.js Remove semicolons. Feb 6, 2017
zipObjectDeep.js Remove semicolons. Feb 6, 2017
zipWith.js

README.md

lodash

Site | Docs | FP Guide | Contributing | Wiki | Code of Conduct | Twitter | Chat

The Lodash library exported as a UMD module.

Generated using lodash-cli:

$ npm run build
$ lodash -o ./dist/lodash.js
$ lodash core -o ./dist/lodash.core.js

Download

Lodash is released under the MIT license & supports modern environments.
Review the build differences & pick one that’s right for you.

Installation

In a browser:

<script src="lodash.js"></script>

Using npm:

$ npm i -g npm
$ npm i lodash

Note: add --save if you are using npm < 5.0.0

In Node.js:

// Load the full build.
var _ = require('lodash');
// Load the core build.
var _ = require('lodash/core');
// Load the FP build for immutable auto-curried iteratee-first data-last methods.
var fp = require('lodash/fp');

// Load method categories.
var array = require('lodash/array');
var object = require('lodash/fp/object');

// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
var at = require('lodash/at');
var curryN = require('lodash/fp/curryN');

Looking for Lodash modules written in ES6 or smaller bundle sizes? Check out lodash-es.

Why Lodash?

Lodash makes JavaScript easier by taking the hassle out of working with arrays,
numbers, objects, strings, etc. Lodash’s modular methods are great for:

  • Iterating arrays, objects, & strings
  • Manipulating & testing values
  • Creating composite functions

Module Formats

Lodash is available in a variety of builds & module formats.

You can’t perform that action at this time.