A modern JavaScript utility library delivering modularity, performance, & extras.
JavaScript
Latest commit b9c61ee Feb 23, 2017 @jdalton jdalton Remove `rearg`.
Permalink
Failed to load latest commit information.
.github Add construction emojis. Jan 19, 2017
.internal Remove `rearg`. Feb 23, 2017
.editorconfig Define trim_trailing_whitespace rule for all files. Jan 27, 2016
.eslintrc.js Esling ES6 rules for current codebase. Feb 17, 2017
.gitattributes Simplify .gitattributes. [ci skip] May 19, 2014
.gitignore Minor .gitignore cleanup. Jul 29, 2016
.jscsrc Remove duplicate operator. [ci skip] Oct 3, 2016
CHANGELOG Simplify changelog reference. [ci skip] Sep 15, 2016
LICENSE Rename jQuery Foundation to JS Foundation. [ci skip] Oct 19, 2016
README.md Bump to v4.17.4. Jan 6, 2017
add.js Remove semicolons. Feb 6, 2017
after.js Remove semicolons. Feb 6, 2017
ary.js Remove semicolons. Feb 6, 2017
assignWith.js Remove semicolons. Feb 6, 2017
at.js Remove semicolons. Feb 6, 2017
attempt.js Remove semicolons. Feb 6, 2017
before.js Remove semicolons. Feb 6, 2017
bindKey.js Remove semicolons. Feb 6, 2017
camelCase.js Remove semicolons. Feb 6, 2017
capitalize.js Remove semicolons. Feb 6, 2017
castArray.js Remove semicolons. Feb 6, 2017
ceil.js Remove semicolons. Feb 6, 2017
chunk.js Remove semicolons. Feb 6, 2017
clamp.js Remove semicolons. Feb 6, 2017
clone.js Remove semicolons. Feb 6, 2017
cloneDeep.js Remove semicolons. Feb 6, 2017
cloneDeepWith.js Remove semicolons. Feb 6, 2017
cloneWith.js Remove semicolons. Feb 6, 2017
compact.js Minor var order juggle in `compact`. Feb 6, 2017
concat.js Simplify `concat`. Feb 21, 2017
cond.js Remove semicolons. Feb 6, 2017
conforms.js Remove semicolons. Feb 6, 2017
conformsTo.js Remove semicolons. Feb 6, 2017
countBy.js Missing iteratee call in `countBy` (missed in 5baad4d). Feb 22, 2017
create.js Remove `baseCreate`. Feb 6, 2017
curry.js Remove semicolons. Feb 6, 2017
curryRight.js Remove semicolons. Feb 6, 2017
debounce.js Eslint cleanup (imports left), except template. Feb 17, 2017
deburr.js Remove semicolons. Feb 6, 2017
defaultTo.js Remove semicolons. Feb 6, 2017
defaults.js Eslint cleanup (imports left), except template. Feb 17, 2017
defaultsDeep.js Remove semicolons. Feb 6, 2017
defer.js Remove semicolons. Feb 6, 2017
delay.js Remove semicolons. Feb 6, 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 semicolons. Feb 6, 2017
dropRight.js Remove semicolons. Feb 6, 2017
dropRightWhile.js Remove semicolons. Feb 6, 2017
dropWhile.js Remove semicolons. Feb 6, 2017
each.js Remove semicolons. Feb 6, 2017
eachRight.js Remove semicolons. Feb 6, 2017
endsWith.js Remove semicolons. Feb 6, 2017
eq.js Remove semicolons. Feb 6, 2017
eqDeep.js Remove semicolons. Feb 6, 2017
escape.js Remove semicolons. Feb 6, 2017
escapeRegExp.js Remove semicolons. Feb 6, 2017
every.js Remove semicolons. Feb 6, 2017
filter.js Remove semicolons. Feb 6, 2017
find.js Remove semicolons. Feb 6, 2017
findKey.js Remove semicolons. Feb 6, 2017
findLast.js Remove semicolons. Feb 6, 2017
findLastIndex.js Remove semicolons. Feb 6, 2017
findLastKey.js Remove semicolons. Feb 6, 2017
first.js Remove semicolons. Feb 6, 2017
flatMap.js Remove semicolons. Feb 6, 2017
flatMapDeep.js Remove semicolons. Feb 6, 2017
flatMapDepth.js Remove semicolons. Feb 6, 2017
flatten.js Remove semicolons. Feb 6, 2017
flattenDeep.js Remove semicolons. Feb 6, 2017
flattenDepth.js Remove semicolons. Feb 6, 2017
flip.js Remove semicolons. Feb 6, 2017
floor.js Remove semicolons. Feb 6, 2017
flow.js Use “composes” to describe flow/flowRight. [closes #2979] Feb 7, 2017
flowRight.js Use “composes” to describe flow/flowRight. [closes #2979] Feb 7, 2017
forEach.js Remove semicolons. Feb 6, 2017
forEachRight.js Remove semicolons. Feb 6, 2017
forOwn.js Remove semicolons. Feb 6, 2017
forOwnRight.js Remove semicolons. Feb 6, 2017
fromPairs.js Remove semicolons. Feb 6, 2017
functions.js Remove semicolons. Feb 6, 2017
get.js Remove semicolons. Feb 6, 2017
groupBy.js Missing iteratee call in `groupBy` and `keyBy`. Feb 21, 2017
gt.js Remove semicolons. Feb 6, 2017
gte.js Remove semicolons. Feb 6, 2017
has.js Remove semicolons. Feb 6, 2017
hasIn.js Remove semicolons. Feb 6, 2017
head.js Use consistent `null` check in `head`. Feb 6, 2017
inRange.js Remove semicolons. Feb 6, 2017
indexOf.js Remove semicolons. Feb 6, 2017
initial.js Remove semicolons. Feb 6, 2017
intersection.js Remove semicolons. Feb 6, 2017
intersectionBy.js Remove semicolons. Feb 6, 2017
intersectionWith.js Remove semicolons. Feb 6, 2017
invert.js Fixin imports in invert methods. (#3002) Feb 13, 2017
invertBy.js Fixin imports in invert methods. (#3002) Feb 13, 2017
invoke.js Fixin imports in invoke. (#3001) Feb 13, 2017
invokeMap.js Remove semicolons. Feb 6, 2017
isArguments.js Simplify isType methods. Feb 11, 2017
isArrayBuffer.js Remove semicolons. Feb 6, 2017
isArrayLike.js Remove semicolons. Feb 6, 2017
isArrayLikeObject.js Remove semicolons. Feb 6, 2017
isBoolean.js Remove semicolons. Feb 6, 2017
isBuffer.js Complete stubs removal (c5c0ff7). (#3007) Feb 15, 2017
isDate.js Remove semicolons. Feb 6, 2017
isElement.js Remove semicolons. Feb 6, 2017
isEmpty.js Remove semicolons. Feb 6, 2017
isEqualWith.js Remove semicolons. Feb 6, 2017
isError.js Remove semicolons. Feb 6, 2017
isFunction.js Remove semicolons. Feb 6, 2017
isLength.js Remove semicolons. Feb 6, 2017
isMap.js Remove semicolons. Feb 6, 2017
isMatch.js Remove semicolons. Feb 6, 2017
isMatchWith.js Remove semicolons. Feb 6, 2017
isNative.js Remove semicolons. Feb 6, 2017
isNil.js Remove semicolons. Feb 6, 2017
isNull.js Remove semicolons. Feb 6, 2017
isNumber.js Remove semicolons. Feb 6, 2017
isObject.js Remove semicolons. Feb 6, 2017
isObjectLike.js Remove semicolons. Feb 6, 2017
isPlainObject.js Remove semicolons. Feb 6, 2017
isRegExp.js Remove semicolons. Feb 6, 2017
isSet.js Simplify isType methods. Feb 11, 2017
isString.js Simplify isType methods. Feb 11, 2017
isSymbol.js Simplify isType methods. Feb 11, 2017
isTypedArray.js Simplify isType methods. Feb 11, 2017
isUndefined.js Remove semicolons. Feb 6, 2017
isWeakMap.js Simplify isType methods. Feb 11, 2017
isWeakSet.js Simplify isType methods. Feb 11, 2017
join.js Remove semicolons. Feb 6, 2017
kebabCase.js Remove semicolons. Feb 6, 2017
keyBy.js Missing iteratee call in `groupBy` and `keyBy`. Feb 21, 2017
keys.js Remove semicolons. Feb 6, 2017
last.js Remove semicolons. Feb 6, 2017
lastIndexOf.js Remove semicolons. Feb 6, 2017
lowerCase.js Remove semicolons. Feb 6, 2017
lowerFirst.js Remove semicolons. Feb 6, 2017
lt.js Remove semicolons. Feb 6, 2017
lte.js Remove semicolons. Feb 6, 2017
map.js Remove semicolons. Feb 6, 2017
mapKeys.js Remove semicolons. Feb 6, 2017
mapValues.js Remove semicolons. Feb 6, 2017
matches.js Remove semicolons. Feb 6, 2017
matchesProperty.js Remove semicolons. Feb 6, 2017
maxBy.js Remove semicolons. Feb 6, 2017
mean.js Complete `identity` removal module. (#2993) Feb 11, 2017
meanBy.js Remove semicolons. Feb 6, 2017
memoize.js Remove semicolons. Feb 6, 2017
merge.js Remove semicolons. Feb 6, 2017
mergeWith.js Remove semicolons. Feb 6, 2017
method.js Remove semicolons. Feb 6, 2017
methodOf.js Remove semicolons. Feb 6, 2017
minBy.js Remove semicolons. Feb 6, 2017
multiply.js Remove semicolons. Feb 6, 2017
negate.js Remove semicolons. Feb 6, 2017
nth.js Remove semicolons. Feb 6, 2017
nthArg.js Remove semicolons. Feb 6, 2017
once.js Remove semicolons. Feb 6, 2017
orderBy.js Remove semicolons. Feb 6, 2017
over.js Remove semicolons. Feb 6, 2017
overArgs.js Remove semicolons. Feb 6, 2017
overEvery.js Remove semicolons. Feb 6, 2017
overSome.js Remove semicolons. Feb 6, 2017
package.json Minimal eslint config. (#3015) Feb 17, 2017
pad.js Remove semicolons. Feb 6, 2017
padEnd.js Remove semicolons. Feb 6, 2017
padStart.js Remove semicolons. Feb 6, 2017
parseInt.js Remove semicolons. Feb 6, 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 Remove semicolons. Feb 6, 2017
property.js Remove semicolons. Feb 6, 2017
propertyOf.js Remove semicolons. Feb 6, 2017
pull.js Remove semicolons. Feb 6, 2017
pullAll.js Remove semicolons. Feb 6, 2017
pullAllBy.js Remove semicolons. Feb 6, 2017
pullAllWith.js Remove semicolons. Feb 6, 2017
pullAt.js Remove semicolons. Feb 6, 2017
random.js Replace one time used variables with their original refs in `random`. Feb 18, 2017
range.js Remove semicolons. Feb 6, 2017
rangeRight.js Remove semicolons. Feb 6, 2017
reduce.js Remove semicolons. Feb 6, 2017
reduceRight.js Remove semicolons. Feb 6, 2017
reject.js Remove semicolons. Feb 6, 2017
remove.js Remove semicolons. Feb 6, 2017
repeat.js Remove semicolons. Feb 6, 2017
replace.js Eslint cleanup (imports left), except template. Feb 17, 2017
result.js Remove semicolons. Feb 6, 2017
round.js Remove semicolons. Feb 6, 2017
sample.js Simplify `shuffle` and `sample`. Feb 7, 2017
sampleSize.js Correct name of var and add missing import. (#2999) Feb 13, 2017
set.js Remove semicolons. Feb 6, 2017
setWith.js Remove semicolons. Feb 6, 2017
shuffle.js Fixin import path to copyArray. (#3000) Feb 13, 2017
size.js Remove semicolons. Feb 6, 2017
slice.js Remove semicolons. Feb 6, 2017
snakeCase.js Remove semicolons. Feb 6, 2017
some.js Remove semicolons. Feb 6, 2017
sortedIndex.js Remove semicolons. Feb 6, 2017
sortedIndexBy.js Remove semicolons. Feb 6, 2017
sortedIndexOf.js Remove semicolons. Feb 6, 2017
sortedLastIndex.js Remove semicolons. Feb 6, 2017
sortedLastIndexBy.js Remove semicolons. Feb 6, 2017
sortedLastIndexOf.js Remove semicolons. Feb 6, 2017
sortedUniq.js Remove semicolons. Feb 6, 2017
sortedUniqBy.js Remove semicolons. Feb 6, 2017
split.js Remove semicolons. Feb 6, 2017
startCase.js Remove semicolons. Feb 6, 2017
startsWith.js Remove semicolons. Feb 6, 2017
subtract.js Remove semicolons. Feb 6, 2017
sum.js Complete `identity` removal module. (#2993) Feb 11, 2017
sumBy.js Remove semicolons. Feb 6, 2017
tail.js Remove semicolons. Feb 6, 2017
take.js Remove semicolons. Feb 6, 2017
takeRight.js Remove semicolons. Feb 6, 2017
takeRightWhile.js Remove semicolons. Feb 6, 2017
takeWhile.js Remove semicolons. Feb 6, 2017
template.js Fixin vars declaration inside templating fn because they cannot be de… Feb 20, 2017
templateSettings.js Remove semicolons. Feb 6, 2017
throttle.js Remove semicolons. Feb 6, 2017
times.js Remove semicolons. Feb 6, 2017
toArray.js Remove semicolons. Feb 6, 2017
toFinite.js Remove semicolons. Feb 6, 2017
toInteger.js Remove semicolons. Feb 6, 2017
toLength.js Remove semicolons. Feb 6, 2017
toLower.js Remove semicolons. Feb 6, 2017
toNumber.js Remove semicolons. Feb 6, 2017
toPath.js Remove semicolons. Feb 6, 2017
toPlainObject.js Eslint cleanup (imports left), except template. Feb 17, 2017
toSafeInteger.js Remove semicolons. Feb 6, 2017
toString.js Complete semicolons removal (6cb3460). Feb 16, 2017
toUpper.js Remove semicolons. Feb 6, 2017
transform.js Additional fix for b0980a9 Remove `baseCreate`. (#2988) Feb 11, 2017
trim.js Simplify method juggle in trim modules. Feb 8, 2017
trimEnd.js Simplify method juggle in trim modules. Feb 8, 2017
trimStart.js Simplify method juggle in trim modules. Feb 8, 2017
truncate.js Remove semicolons. Feb 6, 2017
unescape.js Unescape with broken regexp (#2992) Feb 11, 2017
union.js Remove semicolons. Feb 6, 2017
unionBy.js Remove semicolons. Feb 6, 2017
unionWith.js Remove semicolons. Feb 6, 2017
uniq.js Remove semicolons. Feb 6, 2017
uniqBy.js Remove semicolons. Feb 6, 2017
uniqWith.js Remove semicolons. Feb 6, 2017
uniqueId.js Remove semicolons. Feb 6, 2017
unset.js Remove semicolons. Feb 6, 2017
unzip.js Remove semicolons. Feb 6, 2017
unzipWith.js Remove semicolons. Feb 6, 2017
update.js Remove semicolons. Feb 6, 2017
updateWith.js Remove semicolons. Feb 6, 2017
upperCase.js Remove semicolons. Feb 6, 2017
upperFirst.js Remove semicolons. Feb 6, 2017
values.js Remove semicolons. Feb 6, 2017
without.js Remove semicolons. Feb 6, 2017
words.js Remove semicolons. Feb 6, 2017
xor.js Remove semicolons. Feb 6, 2017
xorBy.js Remove semicolons. Feb 6, 2017
xorWith.js Remove semicolons. Feb 6, 2017
zip.js Remove semicolons. Feb 6, 2017
zipObject.js Remove semicolons. Feb 6, 2017
zipObjectDeep.js Remove semicolons. Feb 6, 2017
zipWith.js Remove semicolons. Feb 6, 2017

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.