A modern JavaScript utility library delivering modularity, performance, & extras.
Clone or download
Pull request Compare This branch is 76 commits behind lodash:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.internal
.editorconfig
.eslintrc.js
.gitattributes
.gitignore
CHANGELOG
LICENSE
README.md
add.js
after.js
ary.js
assignWith.js
at.js
attempt.js
before.js
bindKey.js
camelCase.js
capitalize.js
castArray.js
ceil.js
chunk.js
clamp.js
clone.js
cloneDeep.js
cloneDeepWith.js
cloneWith.js
compact.js
cond.js
conforms.js
conformsTo.js
countBy.js
create.js
curry.js
curryRight.js
debounce.js
deburr.js
defaultTo.js
defaults.js
defaultsDeep.js
defer.js
delay.js
difference.js
differenceBy.js
differenceWith.js
divide.js
drop.js
dropRight.js
dropRightWhile.js
dropWhile.js
each.js
eachRight.js
endsWith.js
eq.js
eqDeep.js
escape.js
escapeRegExp.js
every.js
everyValue.js
filter.js
filterObject.js
find.js
findKey.js
findLast.js
findLastIndex.js
findLastKey.js
first.js
flatMap.js
flatMapDeep.js
flatMapDepth.js
flatten.js
flattenDeep.js
flattenDepth.js
flip.js
floor.js
flow.js
flowRight.js
forEach.js
forEachRight.js
forOwn.js
forOwnRight.js
fromPairs.js
functions.js
get.js
groupBy.js
gt.js
gte.js
has.js
hasIn.js
hasPath.js
hasPathIn.js
head.js
inRange.js
indexOf.js
initial.js
intersection.js
intersectionBy.js
intersectionWith.js
invert.js
invertBy.js
invoke.js
invokeMap.js
isArguments.js
isArrayBuffer.js
isArrayLike.js
isArrayLikeObject.js
isBoolean.js
isBuffer.js
isDate.js
isElement.js
isEmpty.js
isEqualWith.js
isError.js
isFunction.js
isLength.js
isMap.js
isMatch.js
isMatchWith.js
isNative.js
isNil.js
isNull.js
isNumber.js
isObject.js
isObjectLike.js
isPlainObject.js
isRegExp.js
isSet.js
isString.js
isSymbol.js
isTypedArray.js
isUndefined.js
isWeakMap.js
isWeakSet.js
kebabCase.js
keyBy.js
keys.js
last.js
lastIndexOf.js
lowerCase.js
lowerFirst.js
lt.js
lte.js
map.js
mapKey.js
mapObject.js
mapValue.js
matches.js
matchesProperty.js
maxBy.js
mean.js
meanBy.js
memoize.js
merge.js
mergeWith.js
method.js
methodOf.js
minBy.js
multiply.js
negate.js
nth.js
nthArg.js
once.js
orderBy.js
over.js
overArgs.js
overEvery.js
overSome.js
package.json
pad.js
padEnd.js
padStart.js
parseInt.js
partition.js
pick.js
pickBy.js
property.js
propertyOf.js
pull.js
pullAll.js
pullAllBy.js
pullAllWith.js
pullAt.js
random.js
range.js
rangeRight.js
reduce.js
reduceRight.js
reject.js
remove.js
repeat.js
replace.js
result.js
round.js
sample.js
sampleSize.js
set.js
setWith.js
shuffle.js
size.js
slice.js
snakeCase.js
some.js
someValue.js
sortedIndex.js
sortedIndexBy.js
sortedIndexOf.js
sortedLastIndex.js
sortedLastIndexBy.js
sortedLastIndexOf.js
sortedUniq.js
sortedUniqBy.js
split.js
startCase.js
startsWith.js
subtract.js
sum.js
sumBy.js
tail.js
take.js
takeRight.js
takeRightWhile.js
takeWhile.js
template.js
templateSettings.js
throttle.js
times.js
toArray.js
toFinite.js
toInteger.js
toLength.js
toNumber.js
toPath.js
toPlainObject.js
toSafeInteger.js
toString.js
transform.js
trim.js
trimEnd.js
trimStart.js
truncate.js
unescape.js
union.js
unionBy.js
unionWith.js
uniq.js
uniqBy.js
uniqWith.js
uniqueId.js
unset.js
unzip.js
unzipWith.js
update.js
updateWith.js
upperCase.js
upperFirst.js
values.js
without.js
words.js
xor.js
xorBy.js
xorWith.js
zip.js
zipObject.js
zipObjectDeep.js
zipWith.js

README.md

lodash v4.17.4

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 --save lodash

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');

Note:
Install n_ for Lodash use in the Node.js < 6 REPL.

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.