1 # <a href="https://lodash.com/">lodash</a> <span>v4.13.1</span>
3 <!-- div class="toc-container" -->
8 * <a href="#_chunkarray-size1">`_.chunk`</a>
9 * <a href="#_compactarray">`_.compact`</a>
10 * <a href="#_concatarray-values">`_.concat`</a>
11 * <a href="#_differencearray-values">`_.difference`</a>
12 * <a href="#_differencebyarray-values-iteratee_identity">`_.differenceBy`</a>
13 * <a href="#_differencewitharray-values-comparator">`_.differenceWith`</a>
14 * <a href="#_droparray-n1">`_.drop`</a>
15 * <a href="#_droprightarray-n1">`_.dropRight`</a>
16 * <a href="#_droprightwhilearray-predicate_identity">`_.dropRightWhile`</a>
17 * <a href="#_dropwhilearray-predicate_identity">`_.dropWhile`</a>
18 * <a href="#_fillarray-value-start0-endarraylength">`_.fill`</a>
19 * <a href="#_findindexarray-predicate_identity-fromindex0">`_.findIndex`</a>
20 * <a href="#_findlastindexarray-predicate_identity-fromindexarraylength-1">`_.findLastIndex`</a>
21 * <a href="#_headarray" class="alias">`_.first` -> `head`</a>
22 * <a href="#_flattenarray">`_.flatten`</a>
23 * <a href="#_flattendeeparray">`_.flattenDeep`</a>
24 * <a href="#_flattendeptharray-depth1">`_.flattenDepth`</a>
25 * <a href="#_frompairspairs">`_.fromPairs`</a>
26 * <a href="#_headarray">`_.head`</a>
27 * <a href="#_indexofarray-value-fromindex0">`_.indexOf`</a>
28 * <a href="#_initialarray">`_.initial`</a>
29 * <a href="#_intersectionarrays">`_.intersection`</a>
30 * <a href="#_intersectionbyarrays-iteratee_identity">`_.intersectionBy`</a>
31 * <a href="#_intersectionwitharrays-comparator">`_.intersectionWith`</a>
32 * <a href="#_joinarray-separator-">`_.join`</a>
33 * <a href="#_lastarray">`_.last`</a>
34 * <a href="#_lastindexofarray-value-fromindexarraylength-1">`_.lastIndexOf`</a>
35 * <a href="#_ntharray-n0">`_.nth`</a>
36 * <a href="#_pullarray-values">`_.pull`</a>
37 * <a href="#_pullallarray-values">`_.pullAll`</a>
38 * <a href="#_pullallbyarray-values-iteratee_identity">`_.pullAllBy`</a>
39 * <a href="#_pullallwitharray-values-comparator">`_.pullAllWith`</a>
40 * <a href="#_pullatarray-indexes">`_.pullAt`</a>
41 * <a href="#_removearray-predicate_identity">`_.remove`</a>
42 * <a href="#_reversearray">`_.reverse`</a>
43 * <a href="#_slicearray-start0-endarraylength">`_.slice`</a>
44 * <a href="#_sortedindexarray-value">`_.sortedIndex`</a>
45 * <a href="#_sortedindexbyarray-value-iteratee_identity">`_.sortedIndexBy`</a>
46 * <a href="#_sortedindexofarray-value">`_.sortedIndexOf`</a>
47 * <a href="#_sortedlastindexarray-value">`_.sortedLastIndex`</a>
48 * <a href="#_sortedlastindexbyarray-value-iteratee_identity">`_.sortedLastIndexBy`</a>
49 * <a href="#_sortedlastindexofarray-value">`_.sortedLastIndexOf`</a>
50 * <a href="#_sorteduniqarray">`_.sortedUniq`</a>
51 * <a href="#_sorteduniqbyarray-iteratee">`_.sortedUniqBy`</a>
52 * <a href="#_tailarray">`_.tail`</a>
53 * <a href="#_takearray-n1">`_.take`</a>
54 * <a href="#_takerightarray-n1">`_.takeRight`</a>
55 * <a href="#_takerightwhilearray-predicate_identity">`_.takeRightWhile`</a>
56 * <a href="#_takewhilearray-predicate_identity">`_.takeWhile`</a>
57 * <a href="#_unionarrays">`_.union`</a>
58 * <a href="#_unionbyarrays-iteratee_identity">`_.unionBy`</a>
59 * <a href="#_unionwitharrays-comparator">`_.unionWith`</a>
60 * <a href="#_uniqarray">`_.uniq`</a>
61 * <a href="#_uniqbyarray-iteratee_identity">`_.uniqBy`</a>
62 * <a href="#_uniqwitharray-comparator">`_.uniqWith`</a>
63 * <a href="#_unziparray">`_.unzip`</a>
64 * <a href="#_unzipwitharray-iteratee_identity">`_.unzipWith`</a>
65 * <a href="#_withoutarray-values">`_.without`</a>
66 * <a href="#_xorarrays">`_.xor`</a>
67 * <a href="#_xorbyarrays-iteratee_identity">`_.xorBy`</a>
68 * <a href="#_xorwitharrays-comparator">`_.xorWith`</a>
69 * <a href="#_ziparrays">`_.zip`</a>
70 * <a href="#_zipobjectprops-values">`_.zipObject`</a>
71 * <a href="#_zipobjectdeepprops-values">`_.zipObjectDeep`</a>
72 * <a href="#_zipwitharrays-iteratee_identity">`_.zipWith`</a>
79 * <a href="#_countbycollection-iteratee_identity">`_.countBy`</a>
80 * <a href="#_foreachcollection-iteratee_identity" class="alias">`_.each` -> `forEach`</a>
81 * <a href="#_foreachrightcollection-iteratee_identity" class="alias">`_.eachRight` -> `forEachRight`</a>
82 * <a href="#_everycollection-predicate_identity">`_.every`</a>
83 * <a href="#_filtercollection-predicate_identity">`_.filter`</a>
84 * <a href="#_findcollection-predicate_identity-fromindex0">`_.find`</a>
85 * <a href="#_findlastcollection-predicate_identity-fromindexcollectionlength-1">`_.findLast`</a>
86 * <a href="#_flatmapcollection-iteratee_identity">`_.flatMap`</a>
87 * <a href="#_flatmapdeepcollection-iteratee_identity">`_.flatMapDeep`</a>
88 * <a href="#_flatmapdepthcollection-iteratee_identity-depth1">`_.flatMapDepth`</a>
89 * <a href="#_foreachcollection-iteratee_identity">`_.forEach`</a>
90 * <a href="#_foreachrightcollection-iteratee_identity">`_.forEachRight`</a>
91 * <a href="#_groupbycollection-iteratee_identity">`_.groupBy`</a>
92 * <a href="#_includescollection-value-fromindex0">`_.includes`</a>
93 * <a href="#_invokemapcollection-path-args">`_.invokeMap`</a>
94 * <a href="#_keybycollection-iteratee_identity">`_.keyBy`</a>
95 * <a href="#_mapcollection-iteratee_identity">`_.map`</a>
96 * <a href="#_orderbycollection-iteratees_identity-orders">`_.orderBy`</a>
97 * <a href="#_partitioncollection-predicate_identity">`_.partition`</a>
98 * <a href="#_reducecollection-iteratee_identity-accumulator">`_.reduce`</a>
99 * <a href="#_reducerightcollection-iteratee_identity-accumulator">`_.reduceRight`</a>
100 * <a href="#_rejectcollection-predicate_identity">`_.reject`</a>
101 * <a href="#_samplecollection">`_.sample`</a>
102 * <a href="#_samplesizecollection-n1">`_.sampleSize`</a>
103 * <a href="#_shufflecollection">`_.shuffle`</a>
104 * <a href="#_sizecollection">`_.size`</a>
105 * <a href="#_somecollection-predicate_identity">`_.some`</a>
106 * <a href="#_sortbycollection-iteratees_identity">`_.sortBy`</a>
113 * <a href="#_now">`_.now`</a>
120 * <a href="#_aftern-func">`_.after`</a>
121 * <a href="#_aryfunc-nfunclength">`_.ary`</a>
122 * <a href="#_beforen-func">`_.before`</a>
123 * <a href="#_bindfunc-thisarg-partials">`_.bind`</a>
124 * <a href="#_bindkeyobject-key-partials">`_.bindKey`</a>
125 * <a href="#_curryfunc-arityfunclength">`_.curry`</a>
126 * <a href="#_curryrightfunc-arityfunclength">`_.curryRight`</a>
127 * <a href="#_debouncefunc-wait0-options-optionsleadingfalse-optionsmaxwait-optionstrailingtrue">`_.debounce`</a>
128 * <a href="#_deferfunc-args">`_.defer`</a>
129 * <a href="#_delayfunc-wait-args">`_.delay`</a>
130 * <a href="#_flipfunc">`_.flip`</a>
131 * <a href="#_memoizefunc-resolver">`_.memoize`</a>
132 * <a href="#_negatepredicate">`_.negate`</a>
133 * <a href="#_oncefunc">`_.once`</a>
134 * <a href="#_overargsfunc">`_.overArgs`</a>
135 * <a href="#_partialfunc-partials">`_.partial`</a>
136 * <a href="#_partialrightfunc-partials">`_.partialRight`</a>
137 * <a href="#_reargfunc-indexes">`_.rearg`</a>
138 * <a href="#_restfunc-startfunclength-1">`_.rest`</a>
139 * <a href="#_spreadfunc-start0">`_.spread`</a>
140 * <a href="#_throttlefunc-wait0-options-optionsleadingtrue-optionstrailingtrue">`_.throttle`</a>
141 * <a href="#_unaryfunc">`_.unary`</a>
142 * <a href="#_wrapvalue-wrapperidentity">`_.wrap`</a>
149 * <a href="#_castarrayvalue">`_.castArray`</a>
150 * <a href="#_clonevalue">`_.clone`</a>
151 * <a href="#_clonedeepvalue">`_.cloneDeep`</a>
152 * <a href="#_clonedeepwithvalue-customizer">`_.cloneDeepWith`</a>
153 * <a href="#_clonewithvalue-customizer">`_.cloneWith`</a>
154 * <a href="#_eqvalue-other">`_.eq`</a>
155 * <a href="#_gtvalue-other">`_.gt`</a>
156 * <a href="#_gtevalue-other">`_.gte`</a>
157 * <a href="#_isargumentsvalue">`_.isArguments`</a>
158 * <a href="#_isarrayvalue">`_.isArray`</a>
159 * <a href="#_isarraybuffervalue">`_.isArrayBuffer`</a>
160 * <a href="#_isarraylikevalue">`_.isArrayLike`</a>
161 * <a href="#_isarraylikeobjectvalue">`_.isArrayLikeObject`</a>
162 * <a href="#_isbooleanvalue">`_.isBoolean`</a>
163 * <a href="#_isbuffervalue">`_.isBuffer`</a>
164 * <a href="#_isdatevalue">`_.isDate`</a>
165 * <a href="#_iselementvalue">`_.isElement`</a>
166 * <a href="#_isemptyvalue">`_.isEmpty`</a>
167 * <a href="#_isequalvalue-other">`_.isEqual`</a>
168 * <a href="#_isequalwithvalue-other-customizer">`_.isEqualWith`</a>
169 * <a href="#_iserrorvalue">`_.isError`</a>
170 * <a href="#_isfinitevalue">`_.isFinite`</a>
171 * <a href="#_isfunctionvalue">`_.isFunction`</a>
172 * <a href="#_isintegervalue">`_.isInteger`</a>
173 * <a href="#_islengthvalue">`_.isLength`</a>
174 * <a href="#_ismapvalue">`_.isMap`</a>
175 * <a href="#_ismatchobject-source">`_.isMatch`</a>
176 * <a href="#_ismatchwithobject-source-customizer">`_.isMatchWith`</a>
177 * <a href="#_isnanvalue">`_.isNaN`</a>
178 * <a href="#_isnativevalue">`_.isNative`</a>
179 * <a href="#_isnilvalue">`_.isNil`</a>
180 * <a href="#_isnullvalue">`_.isNull`</a>
181 * <a href="#_isnumbervalue">`_.isNumber`</a>
182 * <a href="#_isobjectvalue">`_.isObject`</a>
183 * <a href="#_isobjectlikevalue">`_.isObjectLike`</a>
184 * <a href="#_isplainobjectvalue">`_.isPlainObject`</a>
185 * <a href="#_isregexpvalue">`_.isRegExp`</a>
186 * <a href="#_issafeintegervalue">`_.isSafeInteger`</a>
187 * <a href="#_issetvalue">`_.isSet`</a>
188 * <a href="#_isstringvalue">`_.isString`</a>
189 * <a href="#_issymbolvalue">`_.isSymbol`</a>
190 * <a href="#_istypedarrayvalue">`_.isTypedArray`</a>
191 * <a href="#_isundefinedvalue">`_.isUndefined`</a>
192 * <a href="#_isweakmapvalue">`_.isWeakMap`</a>
193 * <a href="#_isweaksetvalue">`_.isWeakSet`</a>
194 * <a href="#_ltvalue-other">`_.lt`</a>
195 * <a href="#_ltevalue-other">`_.lte`</a>
196 * <a href="#_toarrayvalue">`_.toArray`</a>
197 * <a href="#_tofinitevalue">`_.toFinite`</a>
198 * <a href="#_tointegervalue">`_.toInteger`</a>
199 * <a href="#_tolengthvalue">`_.toLength`</a>
200 * <a href="#_tonumbervalue">`_.toNumber`</a>
201 * <a href="#_toplainobjectvalue">`_.toPlainObject`</a>
202 * <a href="#_tosafeintegervalue">`_.toSafeInteger`</a>
203 * <a href="#_tostringvalue">`_.toString`</a>
210 * <a href="#_addaugend-addend">`_.add`</a>
211 * <a href="#_ceilnumber-precision0">`_.ceil`</a>
212 * <a href="#_dividedividend-divisor">`_.divide`</a>
213 * <a href="#_floornumber-precision0">`_.floor`</a>
214 * <a href="#_maxarray">`_.max`</a>
215 * <a href="#_maxbyarray-iteratee_identity">`_.maxBy`</a>
216 * <a href="#_meanarray">`_.mean`</a>
217 * <a href="#_meanbyarray-iteratee_identity">`_.meanBy`</a>
218 * <a href="#_minarray">`_.min`</a>
219 * <a href="#_minbyarray-iteratee_identity">`_.minBy`</a>
220 * <a href="#_multiplymultiplier-multiplicand">`_.multiply`</a>
221 * <a href="#_roundnumber-precision0">`_.round`</a>
222 * <a href="#_subtractminuend-subtrahend">`_.subtract`</a>
223 * <a href="#_sumarray">`_.sum`</a>
224 * <a href="#_sumbyarray-iteratee_identity">`_.sumBy`</a>
231 * <a href="#_clampnumber-lower-upper">`_.clamp`</a>
232 * <a href="#_inrangenumber-start0-end">`_.inRange`</a>
233 * <a href="#_randomlower0-upper1-floating">`_.random`</a>
240 * <a href="#_assignobject-sources">`_.assign`</a>
241 * <a href="#_assigninobject-sources">`_.assignIn`</a>
242 * <a href="#_assigninwithobject-sources-customizer">`_.assignInWith`</a>
243 * <a href="#_assignwithobject-sources-customizer">`_.assignWith`</a>
244 * <a href="#_atobject-paths">`_.at`</a>
245 * <a href="#_createprototype-properties">`_.create`</a>
246 * <a href="#_defaultsobject-sources">`_.defaults`</a>
247 * <a href="#_defaultsdeepobject-sources">`_.defaultsDeep`</a>
248 * <a href="#_topairsobject" class="alias">`_.entries` -> `toPairs`</a>
249 * <a href="#_topairsinobject" class="alias">`_.entriesIn` -> `toPairsIn`</a>
250 * <a href="#_assigninobject-sources" class="alias">`_.extend` -> `assignIn`</a>
251 * <a href="#_assigninwithobject-sources-customizer" class="alias">`_.extendWith` -> `assignInWith`</a>
252 * <a href="#_findkeyobject-predicate_identity">`_.findKey`</a>
253 * <a href="#_findlastkeyobject-predicate_identity">`_.findLastKey`</a>
254 * <a href="#_forinobject-iteratee_identity">`_.forIn`</a>
255 * <a href="#_forinrightobject-iteratee_identity">`_.forInRight`</a>
256 * <a href="#_forownobject-iteratee_identity">`_.forOwn`</a>
257 * <a href="#_forownrightobject-iteratee_identity">`_.forOwnRight`</a>
258 * <a href="#_functionsobject">`_.functions`</a>
259 * <a href="#_functionsinobject">`_.functionsIn`</a>
260 * <a href="#_getobject-path-defaultvalue">`_.get`</a>
261 * <a href="#_hasobject-path">`_.has`</a>
262 * <a href="#_hasinobject-path">`_.hasIn`</a>
263 * <a href="#_invertobject">`_.invert`</a>
264 * <a href="#_invertbyobject-iteratee_identity">`_.invertBy`</a>
265 * <a href="#_invokeobject-path-args">`_.invoke`</a>
266 * <a href="#_keysobject">`_.keys`</a>
267 * <a href="#_keysinobject">`_.keysIn`</a>
268 * <a href="#_mapkeysobject-iteratee_identity">`_.mapKeys`</a>
269 * <a href="#_mapvaluesobject-iteratee_identity">`_.mapValues`</a>
270 * <a href="#_mergeobject-sources">`_.merge`</a>
271 * <a href="#_mergewithobject-sources-customizer">`_.mergeWith`</a>
272 * <a href="#_omitobject-props">`_.omit`</a>
273 * <a href="#_omitbyobject-predicate_identity">`_.omitBy`</a>
274 * <a href="#_pickobject-props">`_.pick`</a>
275 * <a href="#_pickbyobject-predicate_identity">`_.pickBy`</a>
276 * <a href="#_resultobject-path-defaultvalue">`_.result`</a>
277 * <a href="#_setobject-path-value">`_.set`</a>
278 * <a href="#_setwithobject-path-value-customizer">`_.setWith`</a>
279 * <a href="#_topairsobject">`_.toPairs`</a>
280 * <a href="#_topairsinobject">`_.toPairsIn`</a>
281 * <a href="#_transformobject-iteratee_identity-accumulator">`_.transform`</a>
282 * <a href="#_unsetobject-path">`_.unset`</a>
283 * <a href="#_updateobject-path-updater">`_.update`</a>
284 * <a href="#_updatewithobject-path-updater-customizer">`_.updateWith`</a>
285 * <a href="#_valuesobject">`_.values`</a>
286 * <a href="#_valuesinobject">`_.valuesIn`</a>
293 * <a href="#_value">`_`</a>
294 * <a href="#_chainvalue">`_.chain`</a>
295 * <a href="#_tapvalue-interceptor">`_.tap`</a>
296 * <a href="#_thruvalue-interceptor">`_.thru`</a>
297 * <a href="#_prototypesymboliterator">`_.prototype[Symbol.iterator]`</a>
298 * <a href="#_prototypeatpaths">`_.prototype.at`</a>
299 * <a href="#_prototypechain">`_.prototype.chain`</a>
300 * <a href="#_prototypecommit">`_.prototype.commit`</a>
301 * <a href="#_prototypenext">`_.prototype.next`</a>
302 * <a href="#_prototypeplantvalue">`_.prototype.plant`</a>
303 * <a href="#_prototypereverse">`_.prototype.reverse`</a>
304 * <a href="#_prototypevalue" class="alias">`_.prototype.toJSON` -> `value`</a>
305 * <a href="#_prototypevalue">`_.prototype.value`</a>
306 * <a href="#_prototypevalue" class="alias">`_.prototype.valueOf` -> `value`</a>
313 * <a href="#_camelcasestring">`_.camelCase`</a>
314 * <a href="#_capitalizestring">`_.capitalize`</a>
315 * <a href="#_deburrstring">`_.deburr`</a>
316 * <a href="#_endswithstring-target-positionstringlength">`_.endsWith`</a>
317 * <a href="#_escapestring">`_.escape`</a>
318 * <a href="#_escaperegexpstring">`_.escapeRegExp`</a>
319 * <a href="#_kebabcasestring">`_.kebabCase`</a>
320 * <a href="#_lowercasestring">`_.lowerCase`</a>
321 * <a href="#_lowerfirststring">`_.lowerFirst`</a>
322 * <a href="#_padstring-length0-chars">`_.pad`</a>
323 * <a href="#_padendstring-length0-chars">`_.padEnd`</a>
324 * <a href="#_padstartstring-length0-chars">`_.padStart`</a>
325 * <a href="#_parseintstring-radix10">`_.parseInt`</a>
326 * <a href="#_repeatstring-n1">`_.repeat`</a>
327 * <a href="#_replacestring-pattern-replacement">`_.replace`</a>
328 * <a href="#_snakecasestring">`_.snakeCase`</a>
329 * <a href="#_splitstring-separator-limit">`_.split`</a>
330 * <a href="#_startcasestring">`_.startCase`</a>
331 * <a href="#_startswithstring-target-position0">`_.startsWith`</a>
332 * <a href="#_templatestring-options-optionsescape_templatesettingsescape-optionsevaluate_templatesettingsevaluate-optionsimports_templatesettingsimports-optionsinterpolate_templatesettingsinterpolate-optionssourceurllodashtemplatesourcesn-optionsvariableobj">`_.template`</a>
333 * <a href="#_tolowerstring">`_.toLower`</a>
334 * <a href="#_toupperstring">`_.toUpper`</a>
335 * <a href="#_trimstring-charswhitespace">`_.trim`</a>
336 * <a href="#_trimendstring-charswhitespace">`_.trimEnd`</a>
337 * <a href="#_trimstartstring-charswhitespace">`_.trimStart`</a>
338 * <a href="#_truncatestring-options-optionslength30-optionsomission-optionsseparator">`_.truncate`</a>
339 * <a href="#_unescapestring">`_.unescape`</a>
340 * <a href="#_uppercasestring">`_.upperCase`</a>
341 * <a href="#_upperfirststring">`_.upperFirst`</a>
342 * <a href="#_wordsstring-pattern">`_.words`</a>
349 * <a href="#_attemptfunc-args">`_.attempt`</a>
350 * <a href="#_bindallobject-methodnames">`_.bindAll`</a>
351 * <a href="#_condpairs">`_.cond`</a>
352 * <a href="#_conformssource">`_.conforms`</a>
353 * <a href="#_constantvalue">`_.constant`</a>
354 * <a href="#_flowfuncs">`_.flow`</a>
355 * <a href="#_flowrightfuncs">`_.flowRight`</a>
356 * <a href="#_identityvalue">`_.identity`</a>
357 * <a href="#_iterateefunc_identity">`_.iteratee`</a>
358 * <a href="#_matchessource">`_.matches`</a>
359 * <a href="#_matchespropertypath-srcvalue">`_.matchesProperty`</a>
360 * <a href="#_methodpath-args">`_.method`</a>
361 * <a href="#_methodofobject-args">`_.methodOf`</a>
362 * <a href="#_mixinobjectlodash-source-options-optionschaintrue">`_.mixin`</a>
363 * <a href="#_noconflict">`_.noConflict`</a>
364 * <a href="#_noop">`_.noop`</a>
365 * <a href="#_nthargn0">`_.nthArg`</a>
366 * <a href="#_overiteratees_identity">`_.over`</a>
367 * <a href="#_overeverypredicates_identity">`_.overEvery`</a>
368 * <a href="#_oversomepredicates_identity">`_.overSome`</a>
369 * <a href="#_propertypath">`_.property`</a>
370 * <a href="#_propertyofobject">`_.propertyOf`</a>
371 * <a href="#_rangestart0-end-step1">`_.range`</a>
372 * <a href="#_rangerightstart0-end-step1">`_.rangeRight`</a>
373 * <a href="#_runincontextcontextroot">`_.runInContext`</a>
374 * <a href="#_stubarray">`_.stubArray`</a>
375 * <a href="#_stubfalse">`_.stubFalse`</a>
376 * <a href="#_stubobject">`_.stubObject`</a>
377 * <a href="#_stubstring">`_.stubString`</a>
378 * <a href="#_stubtrue">`_.stubTrue`</a>
379 * <a href="#_timesn-iteratee_identity">`_.times`</a>
380 * <a href="#_topathvalue">`_.toPath`</a>
381 * <a href="#_uniqueidprefix">`_.uniqueId`</a>
388 * <a href="#_version">`_.VERSION`</a>
389 * <a href="#_templatesettings">`_.templateSettings`</a>
390 * <a href="#_templatesettingsescape">`_.templateSettings.escape`</a>
391 * <a href="#_templatesettingsevaluate">`_.templateSettings.evaluate`</a>
392 * <a href="#_templatesettingsimports">`_.templateSettings.imports`</a>
393 * <a href="#_templatesettingsinterpolate">`_.templateSettings.interpolate`</a>
394 * <a href="#_templatesettingsvariable">`_.templateSettings.variable`</a>
401 * <a href="#_templatesettingsimports_">`_.templateSettings.imports._`</a>
407 <!-- div class="doc-container" -->
415 ### <a id="_chunkarray-size1"></a>`_.chunk(array, [size=1])`
416 <a href="#_chunkarray-size1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6118 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.chunk "See the npm package")
418 Creates an array of elements split into groups the length of `size`.
419 If `array` can't be split evenly, the final chunk will be the remaining
425 1. `array` *(Array)*: The array to process.
426 2. `[size=1]` *(number)*: The length of each chunk
429 *(Array)*: Returns the new array of chunks.
433 _.chunk(['a', 'b', 'c', 'd'], 2);
434 // => [['a', 'b'], ['c', 'd']]
436 _.chunk(['a', 'b', 'c', 'd'], 3);
437 // => [['a', 'b', 'c'], ['d']]
445 ### <a id="_compactarray"></a>`_.compact(array)`
446 <a href="#_compactarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6153 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.compact "See the npm package")
448 Creates an array with all falsey values removed. The values `false`, `null`,
449 `0`, `""`, `undefined`, and `NaN` are falsey.
454 1. `array` *(Array)*: The array to compact.
457 *(Array)*: Returns the new array of filtered values.
461 _.compact([0, 1, false, 2, '', 3]);
470 ### <a id="_concatarray-values"></a>`_.concat(array, [values])`
471 <a href="#_concatarray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6190 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.concat "See the npm package")
473 Creates a new array concatenating `array` with any additional arrays
479 1. `array` *(Array)*: The array to concatenate.
480 2. `[values]` *(...*)*: The values to concatenate.
483 *(Array)*: Returns the new concatenated array.
488 var other = _.concat(array, 2, [3], [[4]]);
502 ### <a id="_differencearray-values"></a>`_.difference(array, [values])`
503 <a href="#_differencearray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6223 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.difference "See the npm package")
505 Creates an array of unique `array` values not included in the other given
506 arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
507 for equality comparisons. The order of result values is determined by the
508 order they occur in the first array.
513 1. `array` *(Array)*: The array to inspect.
514 2. `[values]` *(...Array)*: The values to exclude.
517 *(Array)*: Returns the new array of filtered values.
521 _.difference([2, 1], [2, 3]);
530 ### <a id="_differencebyarray-values-iteratee_identity"></a>`_.differenceBy(array, [values], [iteratee=_.identity])`
531 <a href="#_differencebyarray-values-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6253 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differenceby "See the npm package")
533 This method is like `_.difference` except that it accepts `iteratee` which
534 is invoked for each element of `array` and `values` to generate the criterion
535 by which they're compared. Result values are chosen from the first array.
536 The iteratee is invoked with one argument: *(value)*.
541 1. `array` *(Array)*: The array to inspect.
542 2. `[values]` *(...Array)*: The values to exclude.
543 3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
546 *(Array)*: Returns the new array of filtered values.
550 _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
553 // The `_.property` iteratee shorthand.
554 _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
563 ### <a id="_differencewitharray-values-comparator"></a>`_.differenceWith(array, [values], [comparator])`
564 <a href="#_differencewitharray-values-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6284 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.differencewith "See the npm package")
566 This method is like `_.difference` except that it accepts `comparator`
567 which is invoked to compare elements of `array` to `values`. Result values
568 are chosen from the first array. The comparator is invoked with two arguments:<br>
574 1. `array` *(Array)*: The array to inspect.
575 2. `[values]` *(...Array)*: The values to exclude.
576 3. `[comparator]` *(Function)*: The comparator invoked per element.
579 *(Array)*: Returns the new array of filtered values.
583 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
585 _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
586 // => [{ 'x': 2, 'y': 1 }]
594 ### <a id="_droparray-n1"></a>`_.drop(array, [n=1])`
595 <a href="#_droparray-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6319 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.drop "See the npm package")
597 Creates a slice of `array` with `n` elements dropped from the beginning.
602 1. `array` *(Array)*: The array to query.
603 2. `[n=1]` *(number)*: The number of elements to drop.
606 *(Array)*: Returns the slice of `array`.
613 _.drop([1, 2, 3], 2);
616 _.drop([1, 2, 3], 5);
619 _.drop([1, 2, 3], 0);
628 ### <a id="_droprightarray-n1"></a>`_.dropRight(array, [n=1])`
629 <a href="#_droprightarray-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6353 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropright "See the npm package")
631 Creates a slice of `array` with `n` elements dropped from the end.
636 1. `array` *(Array)*: The array to query.
637 2. `[n=1]` *(number)*: The number of elements to drop.
640 *(Array)*: Returns the slice of `array`.
644 _.dropRight([1, 2, 3]);
647 _.dropRight([1, 2, 3], 2);
650 _.dropRight([1, 2, 3], 5);
653 _.dropRight([1, 2, 3], 0);
662 ### <a id="_droprightwhilearray-predicate_identity"></a>`_.dropRightWhile(array, [predicate=_.identity])`
663 <a href="#_droprightwhilearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6399 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package")
665 Creates a slice of `array` excluding elements dropped from the end.
666 Elements are dropped until `predicate` returns falsey. The predicate is
667 invoked with three arguments: *(value, index, array)*.
672 1. `array` *(Array)*: The array to query.
673 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
676 *(Array)*: Returns the slice of `array`.
681 { 'user': 'barney', 'active': true },
682 { 'user': 'fred', 'active': false },
683 { 'user': 'pebbles', 'active': false }
686 _.dropRightWhile(users, function(o) { return !o.active; });
687 // => objects for ['barney']
689 // The `_.matches` iteratee shorthand.
690 _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
691 // => objects for ['barney', 'fred']
693 // The `_.matchesProperty` iteratee shorthand.
694 _.dropRightWhile(users, ['active', false]);
695 // => objects for ['barney']
697 // The `_.property` iteratee shorthand.
698 _.dropRightWhile(users, 'active');
699 // => objects for ['barney', 'fred', 'pebbles']
707 ### <a id="_dropwhilearray-predicate_identity"></a>`_.dropWhile(array, [predicate=_.identity])`
708 <a href="#_dropwhilearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6441 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.dropwhile "See the npm package")
710 Creates a slice of `array` excluding elements dropped from the beginning.
711 Elements are dropped until `predicate` returns falsey. The predicate is
712 invoked with three arguments: *(value, index, array)*.
717 1. `array` *(Array)*: The array to query.
718 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
721 *(Array)*: Returns the slice of `array`.
726 { 'user': 'barney', 'active': false },
727 { 'user': 'fred', 'active': false },
728 { 'user': 'pebbles', 'active': true }
731 _.dropWhile(users, function(o) { return !o.active; });
732 // => objects for ['pebbles']
734 // The `_.matches` iteratee shorthand.
735 _.dropWhile(users, { 'user': 'barney', 'active': false });
736 // => objects for ['fred', 'pebbles']
738 // The `_.matchesProperty` iteratee shorthand.
739 _.dropWhile(users, ['active', false]);
740 // => objects for ['pebbles']
742 // The `_.property` iteratee shorthand.
743 _.dropWhile(users, 'active');
744 // => objects for ['barney', 'fred', 'pebbles']
752 ### <a id="_fillarray-value-start0-endarraylength"></a>`_.fill(array, value, [start=0], [end=array.length])`
753 <a href="#_fillarray-value-start0-endarraylength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6476 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.fill "See the npm package")
755 Fills elements of `array` with `value` from `start` up to, but not
759 **Note:** This method mutates `array`.
764 1. `array` *(Array)*: The array to fill.
765 2. `value` *(*)*: The value to fill `array` with.
766 3. `[start=0]` *(number)*: The start position.
767 4. `[end=array.length]` *(number)*: The end position.
770 *(Array)*: Returns `array`.
774 var array = [1, 2, 3];
778 // => ['a', 'a', 'a']
783 _.fill([4, 6, 8, 10], '*', 1, 3);
784 // => [4, '*', '*', 10]
792 ### <a id="_findindexarray-predicate_identity-fromindex0"></a>`_.findIndex(array, [predicate=_.identity], [fromIndex=0])`
793 <a href="#_findindexarray-predicate_identity-fromindex0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6524 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findindex "See the npm package")
795 This method is like `_.find` except that it returns the index of the first
796 element `predicate` returns truthy for instead of the element itself.
801 1. `array` *(Array)*: The array to search.
802 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
803 3. `[fromIndex=0]` *(number)*: The index to search from.
806 *(number)*: Returns the index of the found element, else `-1`.
811 { 'user': 'barney', 'active': false },
812 { 'user': 'fred', 'active': false },
813 { 'user': 'pebbles', 'active': true }
816 _.findIndex(users, function(o) { return o.user == 'barney'; });
819 // The `_.matches` iteratee shorthand.
820 _.findIndex(users, { 'user': 'fred', 'active': false });
823 // The `_.matchesProperty` iteratee shorthand.
824 _.findIndex(users, ['active', false]);
827 // The `_.property` iteratee shorthand.
828 _.findIndex(users, 'active');
837 ### <a id="_findlastindexarray-predicate_identity-fromindexarraylength-1"></a>`_.findLastIndex(array, [predicate=_.identity], [fromIndex=array.length-1])`
838 <a href="#_findlastindexarray-predicate_identity-fromindexarraylength-1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6572 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastindex "See the npm package")
840 This method is like `_.findIndex` except that it iterates over elements
841 of `collection` from right to left.
846 1. `array` *(Array)*: The array to search.
847 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
848 3. `[fromIndex=array.length-1]` *(number)*: The index to search from.
851 *(number)*: Returns the index of the found element, else `-1`.
856 { 'user': 'barney', 'active': true },
857 { 'user': 'fred', 'active': false },
858 { 'user': 'pebbles', 'active': false }
861 _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
864 // The `_.matches` iteratee shorthand.
865 _.findLastIndex(users, { 'user': 'barney', 'active': true });
868 // The `_.matchesProperty` iteratee shorthand.
869 _.findLastIndex(users, ['active', false]);
872 // The `_.property` iteratee shorthand.
873 _.findLastIndex(users, 'active');
882 ### <a id="_flattenarray"></a>`_.flatten(array)`
883 <a href="#_flattenarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6601 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatten "See the npm package")
885 Flattens `array` a single level deep.
890 1. `array` *(Array)*: The array to flatten.
893 *(Array)*: Returns the new flattened array.
897 _.flatten([1, [2, [3, [4]], 5]]);
898 // => [1, 2, [3, [4]], 5]
906 ### <a id="_flattendeeparray"></a>`_.flattenDeep(array)`
907 <a href="#_flattendeeparray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6620 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendeep "See the npm package")
909 Recursively flattens `array`.
914 1. `array` *(Array)*: The array to flatten.
917 *(Array)*: Returns the new flattened array.
921 _.flattenDeep([1, [2, [3, [4]], 5]]);
922 // => [1, 2, 3, 4, 5]
930 ### <a id="_flattendeptharray-depth1"></a>`_.flattenDepth(array, [depth=1])`
931 <a href="#_flattendeptharray-depth1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6645 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flattendepth "See the npm package")
933 Recursively flatten `array` up to `depth` times.
938 1. `array` *(Array)*: The array to flatten.
939 2. `[depth=1]` *(number)*: The maximum recursion depth.
942 *(Array)*: Returns the new flattened array.
946 var array = [1, [2, [3, [4]], 5]];
948 _.flattenDepth(array, 1);
949 // => [1, 2, [3, [4]], 5]
951 _.flattenDepth(array, 2);
952 // => [1, 2, 3, [4], 5]
960 ### <a id="_frompairspairs"></a>`_.fromPairs(pairs)`
961 <a href="#_frompairspairs">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6669 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.frompairs "See the npm package")
963 The inverse of `_.toPairs`; this method returns an object composed
964 from key-value `pairs`.
969 1. `pairs` *(Array)*: The key-value pairs.
972 *(Object)*: Returns the new object.
976 _.fromPairs([['fred', 30], ['barney', 40]]);
977 // => { 'fred': 30, 'barney': 40 }
985 ### <a id="_headarray"></a>`_.head(array)`
986 <a href="#_headarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6699 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.head "See the npm package")
988 Gets the first element of `array`.
996 1. `array` *(Array)*: The array to query.
999 *(*)*: Returns the first element of `array`.
1015 ### <a id="_indexofarray-value-fromindex0"></a>`_.indexOf(array, value, [fromIndex=0])`
1016 <a href="#_indexofarray-value-fromindex0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6726 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.indexof "See the npm package")
1018 Gets the index at which the first occurrence of `value` is found in `array`
1019 using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
1020 for equality comparisons. If `fromIndex` is negative, it's used as the
1021 offset from the end of `array`.
1026 1. `array` *(Array)*: The array to search.
1027 2. `value` *(*)*: The value to search for.
1028 3. `[fromIndex=0]` *(number)*: The index to search from.
1031 *(number)*: Returns the index of the matched value, else `-1`.
1035 _.indexOf([1, 2, 1, 2], 2);
1038 // Search from the `fromIndex`.
1039 _.indexOf([1, 2, 1, 2], 2, 2);
1048 ### <a id="_initialarray"></a>`_.initial(array)`
1049 <a href="#_initialarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6752 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.initial "See the npm package")
1051 Gets all but the last element of `array`.
1056 1. `array` *(Array)*: The array to query.
1059 *(Array)*: Returns the slice of `array`.
1063 _.initial([1, 2, 3]);
1072 ### <a id="_intersectionarrays"></a>`_.intersection([arrays])`
1073 <a href="#_intersectionarrays">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6773 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersection "See the npm package")
1075 Creates an array of unique values that are included in all given arrays
1076 using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
1077 for equality comparisons. The order of result values is determined by the
1078 order they occur in the first array.
1083 1. `[arrays]` *(...Array)*: The arrays to inspect.
1086 *(Array)*: Returns the new array of intersecting values.
1090 _.intersection([2, 1], [2, 3]);
1099 ### <a id="_intersectionbyarrays-iteratee_identity"></a>`_.intersectionBy([arrays], [iteratee=_.identity])`
1100 <a href="#_intersectionbyarrays-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6803 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionby "See the npm package")
1102 This method is like `_.intersection` except that it accepts `iteratee`
1103 which is invoked for each element of each `arrays` to generate the criterion
1104 by which they're compared. Result values are chosen from the first array.
1105 The iteratee is invoked with one argument: *(value)*.
1110 1. `[arrays]` *(...Array)*: The arrays to inspect.
1111 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
1114 *(Array)*: Returns the new array of intersecting values.
1118 _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
1121 // The `_.property` iteratee shorthand.
1122 _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
1131 ### <a id="_intersectionwitharrays-comparator"></a>`_.intersectionWith([arrays], [comparator])`
1132 <a href="#_intersectionwitharrays-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6838 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package")
1134 This method is like `_.intersection` except that it accepts `comparator`
1135 which is invoked to compare elements of `arrays`. Result values are chosen
1136 from the first array. The comparator is invoked with two arguments:<br>
1142 1. `[arrays]` *(...Array)*: The arrays to inspect.
1143 2. `[comparator]` *(Function)*: The comparator invoked per element.
1146 *(Array)*: Returns the new array of intersecting values.
1150 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
1151 var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
1153 _.intersectionWith(objects, others, _.isEqual);
1154 // => [{ 'x': 1, 'y': 2 }]
1162 ### <a id="_joinarray-separator-"></a>`_.join(array, [separator=','])`
1163 <a href="#_joinarray-separator-">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6867 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.join "See the npm package")
1165 Converts all elements in `array` into a string separated by `separator`.
1170 1. `array` *(Array)*: The array to convert.
1171 2. `[separator=',']` *(string)*: The element separator.
1174 *(string)*: Returns the joined string.
1178 _.join(['a', 'b', 'c'], '~');
1187 ### <a id="_lastarray"></a>`_.last(array)`
1188 <a href="#_lastarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6885 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.last "See the npm package")
1190 Gets the last element of `array`.
1195 1. `array` *(Array)*: The array to query.
1198 *(*)*: Returns the last element of `array`.
1211 ### <a id="_lastindexofarray-value-fromindexarraylength-1"></a>`_.lastIndexOf(array, value, [fromIndex=array.length-1])`
1212 <a href="#_lastindexofarray-value-fromindexarraylength-1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6911 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lastindexof "See the npm package")
1214 This method is like `_.indexOf` except that it iterates over elements of
1215 `array` from right to left.
1220 1. `array` *(Array)*: The array to search.
1221 2. `value` *(*)*: The value to search for.
1222 3. `[fromIndex=array.length-1]` *(number)*: The index to search from.
1225 *(number)*: Returns the index of the matched value, else `-1`.
1229 _.lastIndexOf([1, 2, 1, 2], 2);
1232 // Search from the `fromIndex`.
1233 _.lastIndexOf([1, 2, 1, 2], 2, 2);
1242 ### <a id="_ntharray-n0"></a>`_.nth(array, [n=0])`
1243 <a href="#_ntharray-n0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6957 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.nth "See the npm package")
1245 Gets the element at index `n` of `array`. If `n` is negative, the nth
1246 element from the end is returned.
1251 1. `array` *(Array)*: The array to query.
1252 2. `[n=0]` *(number)*: The index of the element to return.
1255 *(*)*: Returns the nth element of `array`.
1259 var array = ['a', 'b', 'c', 'd'];
1273 ### <a id="_pullarray-values"></a>`_.pull(array, [values])`
1274 <a href="#_pullarray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6984 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pull "See the npm package")
1276 Removes all given values from `array` using
1277 [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
1278 for equality comparisons.
1281 **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
1282 to remove elements from an array by predicate.
1287 1. `array` *(Array)*: The array to modify.
1288 2. `[values]` *(...*)*: The values to remove.
1291 *(Array)*: Returns `array`.
1295 var array = ['a', 'b', 'c', 'a', 'b', 'c'];
1297 _.pull(array, 'a', 'c');
1307 ### <a id="_pullallarray-values"></a>`_.pullAll(array, values)`
1308 <a href="#_pullallarray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7006 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullall "See the npm package")
1310 This method is like `_.pull` except that it accepts an array of values to remove.
1313 **Note:** Unlike `_.difference`, this method mutates `array`.
1318 1. `array` *(Array)*: The array to modify.
1319 2. `values` *(Array)*: The values to remove.
1322 *(Array)*: Returns `array`.
1326 var array = ['a', 'b', 'c', 'a', 'b', 'c'];
1328 _.pullAll(array, ['a', 'c']);
1338 ### <a id="_pullallbyarray-values-iteratee_identity"></a>`_.pullAllBy(array, values, [iteratee=_.identity])`
1339 <a href="#_pullallbyarray-values-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7036 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallby "See the npm package")
1341 This method is like `_.pullAll` except that it accepts `iteratee` which is
1342 invoked for each element of `array` and `values` to generate the criterion
1343 by which they're compared. The iteratee is invoked with one argument: *(value)*.
1346 **Note:** Unlike `_.differenceBy`, this method mutates `array`.
1351 1. `array` *(Array)*: The array to modify.
1352 2. `values` *(Array)*: The values to remove.
1353 3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
1356 *(Array)*: Returns `array`.
1360 var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
1362 _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
1372 ### <a id="_pullallwitharray-values-comparator"></a>`_.pullAllWith(array, values, [comparator])`
1373 <a href="#_pullallwitharray-values-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7065 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullallwith "See the npm package")
1375 This method is like `_.pullAll` except that it accepts `comparator` which
1376 is invoked to compare elements of `array` to `values`. The comparator is
1377 invoked with two arguments: *(arrVal, othVal)*.
1380 **Note:** Unlike `_.differenceWith`, this method mutates `array`.
1385 1. `array` *(Array)*: The array to modify.
1386 2. `values` *(Array)*: The values to remove.
1387 3. `[comparator]` *(Function)*: The comparator invoked per element.
1390 *(Array)*: Returns `array`.
1394 var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
1396 _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
1398 // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
1406 ### <a id="_pullatarray-indexes"></a>`_.pullAt(array, [indexes])`
1407 <a href="#_pullatarray-indexes">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7095 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pullat "See the npm package")
1409 Removes elements from `array` corresponding to `indexes` and returns an
1410 array of removed elements.
1413 **Note:** Unlike `_.at`, this method mutates `array`.
1418 1. `array` *(Array)*: The array to modify.
1419 2. `[indexes]` *(...(number|number[]))*: The indexes of elements to remove.
1422 *(Array)*: Returns the new array of removed elements.
1426 var array = ['a', 'b', 'c', 'd'];
1427 var pulled = _.pullAt(array, [1, 3]);
1432 console.log(pulled);
1441 ### <a id="_removearray-predicate_identity"></a>`_.remove(array, [predicate=_.identity])`
1442 <a href="#_removearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7137 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.remove "See the npm package")
1444 Removes all elements from `array` that `predicate` returns truthy for
1445 and returns an array of the removed elements. The predicate is invoked
1446 with three arguments: *(value, index, array)*.
1449 **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
1450 to pull elements from an array by value.
1455 1. `array` *(Array)*: The array to modify.
1456 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
1459 *(Array)*: Returns the new array of removed elements.
1463 var array = [1, 2, 3, 4];
1464 var evens = _.remove(array, function(n) {
1480 ### <a id="_reversearray"></a>`_.reverse(array)`
1481 <a href="#_reversearray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7181 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reverse "See the npm package")
1483 Reverses `array` so that the first element becomes the last, the second
1484 element becomes the second to last, and so on.
1487 **Note:** This method mutates `array` and is based on
1488 [`Array#reverse`](https://mdn.io/Array/reverse).
1493 1. `array` *(Array)*: The array to modify.
1496 *(Array)*: Returns `array`.
1500 var array = [1, 2, 3];
1514 ### <a id="_slicearray-start0-endarraylength"></a>`_.slice(array, [start=0], [end=array.length])`
1515 <a href="#_slicearray-start0-endarraylength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7201 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.slice "See the npm package")
1517 Creates a slice of `array` from `start` up to, but not including, `end`.
1520 **Note:** This method is used instead of
1521 [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
1527 1. `array` *(Array)*: The array to slice.
1528 2. `[start=0]` *(number)*: The start position.
1529 3. `[end=array.length]` *(number)*: The end position.
1532 *(Array)*: Returns the slice of `array`.
1540 ### <a id="_sortedindexarray-value"></a>`_.sortedIndex(array, value)`
1541 <a href="#_sortedindexarray-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7234 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindex "See the npm package")
1543 Uses a binary search to determine the lowest index at which `value`
1544 should be inserted into `array` in order to maintain its sort order.
1549 1. `array` *(Array)*: The sorted array to inspect.
1550 2. `value` *(*)*: The value to evaluate.
1553 *(number)*: Returns the index at which `value` should be inserted into `array`.
1557 _.sortedIndex([30, 50], 40);
1566 ### <a id="_sortedindexbyarray-value-iteratee_identity"></a>`_.sortedIndexBy(array, value, [iteratee=_.identity])`
1567 <a href="#_sortedindexbyarray-value-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7264 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package")
1569 This method is like `_.sortedIndex` except that it accepts `iteratee`
1570 which is invoked for `value` and each element of `array` to compute their
1571 sort ranking. The iteratee is invoked with one argument: *(value)*.
1576 1. `array` *(Array)*: The sorted array to inspect.
1577 2. `value` *(*)*: The value to evaluate.
1578 3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
1581 *(number)*: Returns the index at which `value` should be inserted into `array`.
1585 var objects = [{ 'x': 4 }, { 'x': 5 }];
1587 _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
1590 // The `_.property` iteratee shorthand.
1591 _.sortedIndexBy(objects, { 'x': 4 }, 'x');
1600 ### <a id="_sortedindexofarray-value"></a>`_.sortedIndexOf(array, value)`
1601 <a href="#_sortedindexofarray-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7284 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package")
1603 This method is like `_.indexOf` except that it performs a binary
1604 search on a sorted `array`.
1609 1. `array` *(Array)*: The array to search.
1610 2. `value` *(*)*: The value to search for.
1613 *(number)*: Returns the index of the matched value, else `-1`.
1617 _.sortedIndexOf([4, 5, 5, 5, 6], 5);
1626 ### <a id="_sortedlastindexarray-value"></a>`_.sortedLastIndex(array, value)`
1627 <a href="#_sortedlastindexarray-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7313 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package")
1629 This method is like `_.sortedIndex` except that it returns the highest
1630 index at which `value` should be inserted into `array` in order to
1631 maintain its sort order.
1636 1. `array` *(Array)*: The sorted array to inspect.
1637 2. `value` *(*)*: The value to evaluate.
1640 *(number)*: Returns the index at which `value` should be inserted into `array`.
1644 _.sortedLastIndex([4, 5, 5, 5, 6], 5);
1653 ### <a id="_sortedlastindexbyarray-value-iteratee_identity"></a>`_.sortedLastIndexBy(array, value, [iteratee=_.identity])`
1654 <a href="#_sortedlastindexbyarray-value-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7343 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package")
1656 This method is like `_.sortedLastIndex` except that it accepts `iteratee`
1657 which is invoked for `value` and each element of `array` to compute their
1658 sort ranking. The iteratee is invoked with one argument: *(value)*.
1663 1. `array` *(Array)*: The sorted array to inspect.
1664 2. `value` *(*)*: The value to evaluate.
1665 3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
1668 *(number)*: Returns the index at which `value` should be inserted into `array`.
1672 var objects = [{ 'x': 4 }, { 'x': 5 }];
1674 _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
1677 // The `_.property` iteratee shorthand.
1678 _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
1687 ### <a id="_sortedlastindexofarray-value"></a>`_.sortedLastIndexOf(array, value)`
1688 <a href="#_sortedlastindexofarray-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7363 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package")
1690 This method is like `_.lastIndexOf` except that it performs a binary
1691 search on a sorted `array`.
1696 1. `array` *(Array)*: The array to search.
1697 2. `value` *(*)*: The value to search for.
1700 *(number)*: Returns the index of the matched value, else `-1`.
1704 _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
1713 ### <a id="_sorteduniqarray"></a>`_.sortedUniq(array)`
1714 <a href="#_sorteduniqarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7389 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package")
1716 This method is like `_.uniq` except that it's designed and optimized
1722 1. `array` *(Array)*: The array to inspect.
1725 *(Array)*: Returns the new duplicate free array.
1729 _.sortedUniq([1, 1, 2]);
1738 ### <a id="_sorteduniqbyarray-iteratee"></a>`_.sortedUniqBy(array, [iteratee])`
1739 <a href="#_sorteduniqbyarray-iteratee">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7411 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package")
1741 This method is like `_.uniqBy` except that it's designed and optimized
1747 1. `array` *(Array)*: The array to inspect.
1748 2. `[iteratee]` *(Function)*: The iteratee invoked per element.
1751 *(Array)*: Returns the new duplicate free array.
1755 _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
1764 ### <a id="_tailarray"></a>`_.tail(array)`
1765 <a href="#_tailarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7431 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tail "See the npm package")
1767 Gets all but the first element of `array`.
1772 1. `array` *(Array)*: The array to query.
1775 *(Array)*: Returns the slice of `array`.
1788 ### <a id="_takearray-n1"></a>`_.take(array, [n=1])`
1789 <a href="#_takearray-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7460 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.take "See the npm package")
1791 Creates a slice of `array` with `n` elements taken from the beginning.
1796 1. `array` *(Array)*: The array to query.
1797 2. `[n=1]` *(number)*: The number of elements to take.
1800 *(Array)*: Returns the slice of `array`.
1807 _.take([1, 2, 3], 2);
1810 _.take([1, 2, 3], 5);
1813 _.take([1, 2, 3], 0);
1822 ### <a id="_takerightarray-n1"></a>`_.takeRight(array, [n=1])`
1823 <a href="#_takerightarray-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7493 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takeright "See the npm package")
1825 Creates a slice of `array` with `n` elements taken from the end.
1830 1. `array` *(Array)*: The array to query.
1831 2. `[n=1]` *(number)*: The number of elements to take.
1834 *(Array)*: Returns the slice of `array`.
1838 _.takeRight([1, 2, 3]);
1841 _.takeRight([1, 2, 3], 2);
1844 _.takeRight([1, 2, 3], 5);
1847 _.takeRight([1, 2, 3], 0);
1856 ### <a id="_takerightwhilearray-predicate_identity"></a>`_.takeRightWhile(array, [predicate=_.identity])`
1857 <a href="#_takerightwhilearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7539 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package")
1859 Creates a slice of `array` with elements taken from the end. Elements are
1860 taken until `predicate` returns falsey. The predicate is invoked with
1861 three arguments: *(value, index, array)*.
1866 1. `array` *(Array)*: The array to query.
1867 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
1870 *(Array)*: Returns the slice of `array`.
1875 { 'user': 'barney', 'active': true },
1876 { 'user': 'fred', 'active': false },
1877 { 'user': 'pebbles', 'active': false }
1880 _.takeRightWhile(users, function(o) { return !o.active; });
1881 // => objects for ['fred', 'pebbles']
1883 // The `_.matches` iteratee shorthand.
1884 _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
1885 // => objects for ['pebbles']
1887 // The `_.matchesProperty` iteratee shorthand.
1888 _.takeRightWhile(users, ['active', false]);
1889 // => objects for ['fred', 'pebbles']
1891 // The `_.property` iteratee shorthand.
1892 _.takeRightWhile(users, 'active');
1901 ### <a id="_takewhilearray-predicate_identity"></a>`_.takeWhile(array, [predicate=_.identity])`
1902 <a href="#_takewhilearray-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7581 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.takewhile "See the npm package")
1904 Creates a slice of `array` with elements taken from the beginning. Elements
1905 are taken until `predicate` returns falsey. The predicate is invoked with
1906 three arguments: *(value, index, array)*.
1911 1. `array` *(Array)*: The array to query.
1912 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
1915 *(Array)*: Returns the slice of `array`.
1920 { 'user': 'barney', 'active': false },
1921 { 'user': 'fred', 'active': false},
1922 { 'user': 'pebbles', 'active': true }
1925 _.takeWhile(users, function(o) { return !o.active; });
1926 // => objects for ['barney', 'fred']
1928 // The `_.matches` iteratee shorthand.
1929 _.takeWhile(users, { 'user': 'barney', 'active': false });
1930 // => objects for ['barney']
1932 // The `_.matchesProperty` iteratee shorthand.
1933 _.takeWhile(users, ['active', false]);
1934 // => objects for ['barney', 'fred']
1936 // The `_.property` iteratee shorthand.
1937 _.takeWhile(users, 'active');
1946 ### <a id="_unionarrays"></a>`_.union([arrays])`
1947 <a href="#_unionarrays">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7603 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.union "See the npm package")
1949 Creates an array of unique values, in order, from all given arrays using
1950 [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
1951 for equality comparisons.
1956 1. `[arrays]` *(...Array)*: The arrays to inspect.
1959 *(Array)*: Returns the new array of combined values.
1963 _.union([2], [1, 2]);
1972 ### <a id="_unionbyarrays-iteratee_identity"></a>`_.unionBy([arrays], [iteratee=_.identity])`
1973 <a href="#_unionbyarrays-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7630 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionby "See the npm package")
1975 This method is like `_.union` except that it accepts `iteratee` which is
1976 invoked for each element of each `arrays` to generate the criterion by
1977 which uniqueness is computed. The iteratee is invoked with one argument:<br>
1983 1. `[arrays]` *(...Array)*: The arrays to inspect.
1984 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
1987 *(Array)*: Returns the new array of combined values.
1991 _.unionBy([2.1], [1.2, 2.3], Math.floor);
1994 // The `_.property` iteratee shorthand.
1995 _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
1996 // => [{ 'x': 1 }, { 'x': 2 }]
2004 ### <a id="_unionwitharrays-comparator"></a>`_.unionWith([arrays], [comparator])`
2005 <a href="#_unionwitharrays-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7658 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unionwith "See the npm package")
2007 This method is like `_.union` except that it accepts `comparator` which
2008 is invoked to compare elements of `arrays`. The comparator is invoked
2009 with two arguments: *(arrVal, othVal)*.
2014 1. `[arrays]` *(...Array)*: The arrays to inspect.
2015 2. `[comparator]` *(Function)*: The comparator invoked per element.
2018 *(Array)*: Returns the new array of combined values.
2022 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
2023 var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
2025 _.unionWith(objects, others, _.isEqual);
2026 // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
2034 ### <a id="_uniqarray"></a>`_.uniq(array)`
2035 <a href="#_uniqarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7683 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniq "See the npm package")
2037 Creates a duplicate-free version of an array, using
2038 [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
2039 for equality comparisons, in which only the first occurrence of each
2045 1. `array` *(Array)*: The array to inspect.
2048 *(Array)*: Returns the new duplicate free array.
2061 ### <a id="_uniqbyarray-iteratee_identity"></a>`_.uniqBy(array, [iteratee=_.identity])`
2062 <a href="#_uniqbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7711 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqby "See the npm package")
2064 This method is like `_.uniq` except that it accepts `iteratee` which is
2065 invoked for each element in `array` to generate the criterion by which
2066 uniqueness is computed. The iteratee is invoked with one argument: *(value)*.
2071 1. `array` *(Array)*: The array to inspect.
2072 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
2075 *(Array)*: Returns the new duplicate free array.
2079 _.uniqBy([2.1, 1.2, 2.3], Math.floor);
2082 // The `_.property` iteratee shorthand.
2083 _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
2084 // => [{ 'x': 1 }, { 'x': 2 }]
2092 ### <a id="_uniqwitharray-comparator"></a>`_.uniqWith(array, [comparator])`
2093 <a href="#_uniqwitharray-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7736 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqwith "See the npm package")
2095 This method is like `_.uniq` except that it accepts `comparator` which
2096 is invoked to compare elements of `array`. The comparator is invoked with
2097 two arguments: *(arrVal, othVal)*.
2102 1. `array` *(Array)*: The array to inspect.
2103 2. `[comparator]` *(Function)*: The comparator invoked per element.
2106 *(Array)*: Returns the new duplicate free array.
2110 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
2112 _.uniqWith(objects, _.isEqual);
2113 // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
2121 ### <a id="_unziparray"></a>`_.unzip(array)`
2122 <a href="#_unziparray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7761 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzip "See the npm package")
2124 This method is like `_.zip` except that it accepts an array of grouped
2125 elements and creates an array regrouping the elements to their pre-zip
2131 1. `array` *(Array)*: The array of grouped elements to process.
2134 *(Array)*: Returns the new array of regrouped elements.
2138 var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
2139 // => [['fred', 30, true], ['barney', 40, false]]
2142 // => [['fred', 'barney'], [30, 40], [true, false]]
2150 ### <a id="_unzipwitharray-iteratee_identity"></a>`_.unzipWith(array, [iteratee=_.identity])`
2151 <a href="#_unzipwitharray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7798 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unzipwith "See the npm package")
2153 This method is like `_.unzip` except that it accepts `iteratee` to specify
2154 how regrouped values should be combined. The iteratee is invoked with the
2155 elements of each group: *(...group)*.
2160 1. `array` *(Array)*: The array of grouped elements to process.
2161 2. `[iteratee=_.identity]` *(Function)*: The function to combine regrouped values.
2164 *(Array)*: Returns the new array of regrouped elements.
2168 var zipped = _.zip([1, 2], [10, 20], [100, 200]);
2169 // => [[1, 10, 100], [2, 20, 200]]
2171 _.unzipWith(zipped, _.add);
2180 ### <a id="_withoutarray-values"></a>`_.without(array, [values])`
2181 <a href="#_withoutarray-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7829 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.without "See the npm package")
2183 Creates an array excluding all given values using
2184 [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
2185 for equality comparisons.
2190 1. `array` *(Array)*: The array to inspect.
2191 2. `[values]` *(...*)*: The values to exclude.
2194 *(Array)*: Returns the new array of filtered values.
2198 _.without([2, 1, 2, 3], 1, 2);
2207 ### <a id="_xorarrays"></a>`_.xor([arrays])`
2208 <a href="#_xorarrays">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7853 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xor "See the npm package")
2210 Creates an array of unique values that is the
2211 [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
2212 of the given arrays. The order of result values is determined by the order
2213 they occur in the arrays.
2218 1. `[arrays]` *(...Array)*: The arrays to inspect.
2221 *(Array)*: Returns the new array of filtered values.
2225 _.xor([2, 1], [2, 3]);
2234 ### <a id="_xorbyarrays-iteratee_identity"></a>`_.xorBy([arrays], [iteratee=_.identity])`
2235 <a href="#_xorbyarrays-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7880 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorby "See the npm package")
2237 This method is like `_.xor` except that it accepts `iteratee` which is
2238 invoked for each element of each `arrays` to generate the criterion by
2239 which by which they're compared. The iteratee is invoked with one argument:<br>
2245 1. `[arrays]` *(...Array)*: The arrays to inspect.
2246 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
2249 *(Array)*: Returns the new array of filtered values.
2253 _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
2256 // The `_.property` iteratee shorthand.
2257 _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
2266 ### <a id="_xorwitharrays-comparator"></a>`_.xorWith([arrays], [comparator])`
2267 <a href="#_xorwitharrays-comparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7908 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.xorwith "See the npm package")
2269 This method is like `_.xor` except that it accepts `comparator` which is
2270 invoked to compare elements of `arrays`. The comparator is invoked with
2271 two arguments: *(arrVal, othVal)*.
2276 1. `[arrays]` *(...Array)*: The arrays to inspect.
2277 2. `[comparator]` *(Function)*: The comparator invoked per element.
2280 *(Array)*: Returns the new array of filtered values.
2284 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
2285 var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
2287 _.xorWith(objects, others, _.isEqual);
2288 // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
2296 ### <a id="_ziparrays"></a>`_.zip([arrays])`
2297 <a href="#_ziparrays">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7932 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zip "See the npm package")
2299 Creates an array of grouped elements, the first of which contains the
2300 first elements of the given arrays, the second of which contains the
2301 second elements of the given arrays, and so on.
2306 1. `[arrays]` *(...Array)*: The arrays to process.
2309 *(Array)*: Returns the new array of grouped elements.
2313 _.zip(['fred', 'barney'], [30, 40], [true, false]);
2314 // => [['fred', 30, true], ['barney', 40, false]]
2322 ### <a id="_zipobjectprops-values"></a>`_.zipObject([props=[]], [values=[]])`
2323 <a href="#_zipobjectprops-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7950 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobject "See the npm package")
2325 This method is like `_.fromPairs` except that it accepts two arrays,
2326 one of property identifiers and one of corresponding values.
2331 1. `[props=[]]` *(Array)*: The property identifiers.
2332 2. `[values=[]]` *(Array)*: The property values.
2335 *(Object)*: Returns the new object.
2339 _.zipObject(['a', 'b'], [1, 2]);
2340 // => { 'a': 1, 'b': 2 }
2348 ### <a id="_zipobjectdeepprops-values"></a>`_.zipObjectDeep([props=[]], [values=[]])`
2349 <a href="#_zipobjectdeepprops-values">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7969 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package")
2351 This method is like `_.zipObject` except that it supports property paths.
2356 1. `[props=[]]` *(Array)*: The property identifiers.
2357 2. `[values=[]]` *(Array)*: The property values.
2360 *(Object)*: Returns the new object.
2364 _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
2365 // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
2373 ### <a id="_zipwitharrays-iteratee_identity"></a>`_.zipWith([arrays], [iteratee=_.identity])`
2374 <a href="#_zipwitharrays-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7992 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.zipwith "See the npm package")
2376 This method is like `_.zip` except that it accepts `iteratee` to specify
2377 how grouped values should be combined. The iteratee is invoked with the
2378 elements of each group: *(...group)*.
2383 1. `[arrays]` *(...Array)*: The arrays to process.
2384 2. `[iteratee=_.identity]` *(Function)*: The function to combine grouped values.
2387 *(Array)*: Returns the new array of grouped elements.
2391 _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
2404 ## `“Collection” Methods`
2408 ### <a id="_countbycollection-iteratee_identity"></a>`_.countBy(collection, [iteratee=_.identity])`
2409 <a href="#_countbycollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8373 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.countby "See the npm package")
2411 Creates an object composed of keys generated from the results of running
2412 each element of `collection` thru `iteratee`. The corresponding value of
2413 each key is the number of times the key was returned by `iteratee`. The
2414 iteratee is invoked with one argument: *(value)*.
2419 1. `collection` *(Array|Object)*: The collection to iterate over.
2420 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee to transform keys.
2423 *(Object)*: Returns the composed aggregate object.
2427 _.countBy([6.1, 4.2, 6.3], Math.floor);
2428 // => { '4': 1, '6': 2 }
2430 // The `_.property` iteratee shorthand.
2431 _.countBy(['one', 'two', 'three'], 'length');
2432 // => { '3': 2, '5': 1 }
2440 ### <a id="_everycollection-predicate_identity"></a>`_.every(collection, [predicate=_.identity])`
2441 <a href="#_everycollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8414 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.every "See the npm package")
2443 Checks if `predicate` returns truthy for **all** elements of `collection`.
2444 Iteration is stopped once `predicate` returns falsey. The predicate is
2445 invoked with three arguments: *(value, index|key, collection)*.
2450 1. `collection` *(Array|Object)*: The collection to iterate over.
2451 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2454 *(boolean)*: Returns `true` if all elements pass the predicate check, else `false`.
2458 _.every([true, 1, null, 'yes'], Boolean);
2462 { 'user': 'barney', 'age': 36, 'active': false },
2463 { 'user': 'fred', 'age': 40, 'active': false }
2466 // The `_.matches` iteratee shorthand.
2467 _.every(users, { 'user': 'barney', 'active': false });
2470 // The `_.matchesProperty` iteratee shorthand.
2471 _.every(users, ['active', false]);
2474 // The `_.property` iteratee shorthand.
2475 _.every(users, 'active');
2484 ### <a id="_filtercollection-predicate_identity"></a>`_.filter(collection, [predicate=_.identity])`
2485 <a href="#_filtercollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8458 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.filter "See the npm package")
2487 Iterates over elements of `collection`, returning an array of all elements
2488 `predicate` returns truthy for. The predicate is invoked with three
2489 arguments: *(value, index|key, collection)*.
2494 1. `collection` *(Array|Object)*: The collection to iterate over.
2495 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2498 *(Array)*: Returns the new filtered array.
2503 { 'user': 'barney', 'age': 36, 'active': true },
2504 { 'user': 'fred', 'age': 40, 'active': false }
2507 _.filter(users, function(o) { return !o.active; });
2508 // => objects for ['fred']
2510 // The `_.matches` iteratee shorthand.
2511 _.filter(users, { 'age': 36, 'active': true });
2512 // => objects for ['barney']
2514 // The `_.matchesProperty` iteratee shorthand.
2515 _.filter(users, ['active', false]);
2516 // => objects for ['fred']
2518 // The `_.property` iteratee shorthand.
2519 _.filter(users, 'active');
2520 // => objects for ['barney']
2528 ### <a id="_findcollection-predicate_identity-fromindex0"></a>`_.find(collection, [predicate=_.identity], [fromIndex=0])`
2529 <a href="#_findcollection-predicate_identity-fromindex0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8500 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.find "See the npm package")
2531 Iterates over elements of `collection`, returning the first element
2532 `predicate` returns truthy for. The predicate is invoked with three
2533 arguments: *(value, index|key, collection)*.
2538 1. `collection` *(Array|Object)*: The collection to search.
2539 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2540 3. `[fromIndex=0]` *(number)*: The index to search from.
2543 *(*)*: Returns the matched element, else `undefined`.
2548 { 'user': 'barney', 'age': 36, 'active': true },
2549 { 'user': 'fred', 'age': 40, 'active': false },
2550 { 'user': 'pebbles', 'age': 1, 'active': true }
2553 _.find(users, function(o) { return o.age < 40; });
2554 // => object for 'barney'
2556 // The `_.matches` iteratee shorthand.
2557 _.find(users, { 'age': 1, 'active': true });
2558 // => object for 'pebbles'
2560 // The `_.matchesProperty` iteratee shorthand.
2561 _.find(users, ['active', false]);
2562 // => object for 'fred'
2564 // The `_.property` iteratee shorthand.
2565 _.find(users, 'active');
2566 // => object for 'barney'
2574 ### <a id="_findlastcollection-predicate_identity-fromindexcollectionlength-1"></a>`_.findLast(collection, [predicate=_.identity], [fromIndex=collection.length-1])`
2575 <a href="#_findlastcollection-predicate_identity-fromindexcollectionlength-1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8522 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlast "See the npm package")
2577 This method is like `_.find` except that it iterates over elements of
2578 `collection` from right to left.
2583 1. `collection` *(Array|Object)*: The collection to search.
2584 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2585 3. `[fromIndex=collection.length-1]` *(number)*: The index to search from.
2588 *(*)*: Returns the matched element, else `undefined`.
2592 _.findLast([1, 2, 3, 4], function(n) {
2603 ### <a id="_flatmapcollection-iteratee_identity"></a>`_.flatMap(collection, [iteratee=_.identity])`
2604 <a href="#_flatmapcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8546 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmap "See the npm package")
2606 Creates a flattened array of values by running each element in `collection`
2607 thru `iteratee` and flattening the mapped results. The iteratee is invoked
2608 with three arguments: *(value, index|key, collection)*.
2613 1. `collection` *(Array|Object)*: The collection to iterate over.
2614 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2617 *(Array)*: Returns the new flattened array.
2621 function duplicate(n) {
2625 _.flatMap([1, 2], duplicate);
2634 ### <a id="_flatmapdeepcollection-iteratee_identity"></a>`_.flatMapDeep(collection, [iteratee=_.identity])`
2635 <a href="#_flatmapdeepcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8571 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package")
2637 This method is like `_.flatMap` except that it recursively flattens the
2643 1. `collection` *(Array|Object)*: The collection to iterate over.
2644 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2647 *(Array)*: Returns the new flattened array.
2651 function duplicate(n) {
2655 _.flatMapDeep([1, 2], duplicate);
2664 ### <a id="_flatmapdepthcollection-iteratee_identity-depth1"></a>`_.flatMapDepth(collection, [iteratee=_.identity], [depth=1])`
2665 <a href="#_flatmapdepthcollection-iteratee_identity-depth1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8597 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package")
2667 This method is like `_.flatMap` except that it recursively flattens the
2668 mapped results up to `depth` times.
2673 1. `collection` *(Array|Object)*: The collection to iterate over.
2674 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2675 3. `[depth=1]` *(number)*: The maximum recursion depth.
2678 *(Array)*: Returns the new flattened array.
2682 function duplicate(n) {
2686 _.flatMapDepth([1, 2], duplicate, 2);
2687 // => [[1, 1], [2, 2]]
2695 ### <a id="_foreachcollection-iteratee_identity"></a>`_.forEach(collection, [iteratee=_.identity])`
2696 <a href="#_foreachcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8632 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreach "See the npm package")
2698 Iterates over elements of `collection` and invokes `iteratee` for each element.
2699 The iteratee is invoked with three arguments: *(value, index|key, collection)*.
2700 Iteratee functions may exit iteration early by explicitly returning `false`.
2703 **Note:** As with other "Collections" methods, objects with a "length"
2704 property are iterated like arrays. To avoid this behavior use `_.forIn`
2705 or `_.forOwn` for object iteration.
2713 1. `collection` *(Array|Object)*: The collection to iterate over.
2714 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
2717 *(*)*: Returns `collection`.
2721 _([1, 2]).forEach(function(value) {
2724 // => Logs `1` then `2`.
2726 _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
2729 // => Logs 'a' then 'b' (iteration order is not guaranteed).
2737 ### <a id="_foreachrightcollection-iteratee_identity"></a>`_.forEachRight(collection, [iteratee=_.identity])`
2738 <a href="#_foreachrightcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8657 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.foreachright "See the npm package")
2740 This method is like `_.forEach` except that it iterates over elements of
2741 `collection` from right to left.
2749 1. `collection` *(Array|Object)*: The collection to iterate over.
2750 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
2753 *(*)*: Returns `collection`.
2757 _.forEachRight([1, 2], function(value) {
2760 // => Logs `2` then `1`.
2768 ### <a id="_groupbycollection-iteratee_identity"></a>`_.groupBy(collection, [iteratee=_.identity])`
2769 <a href="#_groupbycollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8686 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.groupby "See the npm package")
2771 Creates an object composed of keys generated from the results of running
2772 each element of `collection` thru `iteratee`. The order of grouped values
2773 is determined by the order they occur in `collection`. The corresponding
2774 value of each key is an array of elements responsible for generating the
2775 key. The iteratee is invoked with one argument: *(value)*.
2780 1. `collection` *(Array|Object)*: The collection to iterate over.
2781 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee to transform keys.
2784 *(Object)*: Returns the composed aggregate object.
2788 _.groupBy([6.1, 4.2, 6.3], Math.floor);
2789 // => { '4': [4.2], '6': [6.1, 6.3] }
2791 // The `_.property` iteratee shorthand.
2792 _.groupBy(['one', 'two', 'three'], 'length');
2793 // => { '3': ['one', 'two'], '5': ['three'] }
2801 ### <a id="_includescollection-value-fromindex0"></a>`_.includes(collection, value, [fromIndex=0])`
2802 <a href="#_includescollection-value-fromindex0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8724 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.includes "See the npm package")
2804 Checks if `value` is in `collection`. If `collection` is a string, it's
2805 checked for a substring of `value`, otherwise
2806 [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
2807 is used for equality comparisons. If `fromIndex` is negative, it's used as
2808 the offset from the end of `collection`.
2813 1. `collection` *(Array|Object|string)*: The collection to search.
2814 2. `value` *(*)*: The value to search for.
2815 3. `[fromIndex=0]` *(number)*: The index to search from.
2818 *(boolean)*: Returns `true` if `value` is found, else `false`.
2822 _.includes([1, 2, 3], 1);
2825 _.includes([1, 2, 3], 1, 2);
2828 _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
2831 _.includes('pebbles', 'eb');
2840 ### <a id="_invokemapcollection-path-args"></a>`_.invokeMap(collection, path, [args])`
2841 <a href="#_invokemapcollection-path-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8760 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invokemap "See the npm package")
2843 Invokes the method at `path` of each element in `collection`, returning
2844 an array of the results of each invoked method. Any additional arguments
2845 are provided to each invoked method. If `methodName` is a function, it's
2846 invoked for and `this` bound to, each element in `collection`.
2851 1. `collection` *(Array|Object)*: The collection to iterate over.
2852 2. `path` *(Array|Function|string)*: The path of the method to invoke or the function invoked per iteration.
2853 3. `[args]` *(...*)*: The arguments to invoke each method with.
2856 *(Array)*: Returns the array of results.
2860 _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
2861 // => [[1, 5, 7], [1, 2, 3]]
2863 _.invokeMap([123, 456], String.prototype.split, '');
2864 // => [['1', '2', '3'], ['4', '5', '6']]
2872 ### <a id="_keybycollection-iteratee_identity"></a>`_.keyBy(collection, [iteratee=_.identity])`
2873 <a href="#_keybycollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8802 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keyby "See the npm package")
2875 Creates an object composed of keys generated from the results of running
2876 each element of `collection` thru `iteratee`. The corresponding value of
2877 each key is the last element responsible for generating the key. The
2878 iteratee is invoked with one argument: *(value)*.
2883 1. `collection` *(Array|Object)*: The collection to iterate over.
2884 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee to transform keys.
2887 *(Object)*: Returns the composed aggregate object.
2892 { 'dir': 'left', 'code': 97 },
2893 { 'dir': 'right', 'code': 100 }
2896 _.keyBy(array, function(o) {
2897 return String.fromCharCode(o.code);
2899 // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
2901 _.keyBy(array, 'dir');
2902 // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
2910 ### <a id="_mapcollection-iteratee_identity"></a>`_.map(collection, [iteratee=_.identity])`
2911 <a href="#_mapcollection-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8849 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.map "See the npm package")
2913 Creates an array of values by running each element in `collection` thru
2914 `iteratee`. The iteratee is invoked with three arguments:<br>
2915 *(value, index|key, collection)*.
2918 Many lodash methods are guarded to work as iteratees for methods like
2919 `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
2922 The guarded methods are:<br>
2923 `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
2924 `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
2925 `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
2926 `template`, `trim`, `trimEnd`, `trimStart`, and `words`
2931 1. `collection` *(Array|Object)*: The collection to iterate over.
2932 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2935 *(Array)*: Returns the new mapped array.
2939 function square(n) {
2943 _.map([4, 8], square);
2946 _.map({ 'a': 4, 'b': 8 }, square);
2947 // => [16, 64] (iteration order is not guaranteed)
2950 { 'user': 'barney' },
2954 // The `_.property` iteratee shorthand.
2955 _.map(users, 'user');
2956 // => ['barney', 'fred']
2964 ### <a id="_orderbycollection-iteratees_identity-orders"></a>`_.orderBy(collection, [iteratees=[_.identity]], [orders])`
2965 <a href="#_orderbycollection-iteratees_identity-orders">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8883 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.orderby "See the npm package")
2967 This method is like `_.sortBy` except that it allows specifying the sort
2968 orders of the iteratees to sort by. If `orders` is unspecified, all values
2969 are sorted in ascending order. Otherwise, specify an order of "desc" for
2970 descending or "asc" for ascending sort order of corresponding values.
2975 1. `collection` *(Array|Object)*: The collection to iterate over.
2976 2. `[iteratees=[_.identity]]` *(Array[]|Function[]|Object[]|string[])*: The iteratees to sort by.
2977 3. `[orders]` *(string[])*: The sort orders of `iteratees`.
2980 *(Array)*: Returns the new sorted array.
2985 { 'user': 'fred', 'age': 48 },
2986 { 'user': 'barney', 'age': 34 },
2987 { 'user': 'fred', 'age': 40 },
2988 { 'user': 'barney', 'age': 36 }
2991 // Sort by `user` in ascending order and by `age` in descending order.
2992 _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
2993 // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
3001 ### <a id="_partitioncollection-predicate_identity"></a>`_.partition(collection, [predicate=_.identity])`
3002 <a href="#_partitioncollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8934 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partition "See the npm package")
3004 Creates an array of elements split into two groups, the first of which
3005 contains elements `predicate` returns truthy for, the second of which
3006 contains elements `predicate` returns falsey for. The predicate is
3007 invoked with one argument: *(value)*.
3012 1. `collection` *(Array|Object)*: The collection to iterate over.
3013 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
3016 *(Array)*: Returns the array of grouped elements.
3021 { 'user': 'barney', 'age': 36, 'active': false },
3022 { 'user': 'fred', 'age': 40, 'active': true },
3023 { 'user': 'pebbles', 'age': 1, 'active': false }
3026 _.partition(users, function(o) { return o.active; });
3027 // => objects for [['fred'], ['barney', 'pebbles']]
3029 // The `_.matches` iteratee shorthand.
3030 _.partition(users, { 'age': 1, 'active': false });
3031 // => objects for [['pebbles'], ['barney', 'fred']]
3033 // The `_.matchesProperty` iteratee shorthand.
3034 _.partition(users, ['active', false]);
3035 // => objects for [['barney', 'pebbles'], ['fred']]
3037 // The `_.property` iteratee shorthand.
3038 _.partition(users, 'active');
3039 // => objects for [['fred'], ['barney', 'pebbles']]
3047 ### <a id="_reducecollection-iteratee_identity-accumulator"></a>`_.reduce(collection, [iteratee=_.identity], [accumulator])`
3048 <a href="#_reducecollection-iteratee_identity-accumulator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8975 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduce "See the npm package")
3050 Reduces `collection` to a value which is the accumulated result of running
3051 each element in `collection` thru `iteratee`, where each successive
3052 invocation is supplied the return value of the previous. If `accumulator`
3053 is not given, the first element of `collection` is used as the initial
3054 value. The iteratee is invoked with four arguments:<br>
3055 *(accumulator, value, index|key, collection)*.
3058 Many lodash methods are guarded to work as iteratees for methods like
3059 `_.reduce`, `_.reduceRight`, and `_.transform`.
3062 The guarded methods are:<br>
3063 `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
3069 1. `collection` *(Array|Object)*: The collection to iterate over.
3070 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
3071 3. `[accumulator]` *(*)*: The initial value.
3074 *(*)*: Returns the accumulated value.
3078 _.reduce([1, 2], function(sum, n) {
3083 _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
3084 (result[value] || (result[value] = [])).push(key);
3087 // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
3095 ### <a id="_reducerightcollection-iteratee_identity-accumulator"></a>`_.reduceRight(collection, [iteratee=_.identity], [accumulator])`
3096 <a href="#_reducerightcollection-iteratee_identity-accumulator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9004 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reduceright "See the npm package")
3098 This method is like `_.reduce` except that it iterates over elements of
3099 `collection` from right to left.
3104 1. `collection` *(Array|Object)*: The collection to iterate over.
3105 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
3106 3. `[accumulator]` *(*)*: The initial value.
3109 *(*)*: Returns the accumulated value.
3113 var array = [[0, 1], [2, 3], [4, 5]];
3115 _.reduceRight(array, function(flattened, other) {
3116 return flattened.concat(other);
3118 // => [4, 5, 2, 3, 0, 1]
3126 ### <a id="_rejectcollection-predicate_identity"></a>`_.reject(collection, [predicate=_.identity])`
3127 <a href="#_rejectcollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9046 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.reject "See the npm package")
3129 The opposite of `_.filter`; this method returns the elements of `collection`
3130 that `predicate` does **not** return truthy for.
3135 1. `collection` *(Array|Object)*: The collection to iterate over.
3136 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
3139 *(Array)*: Returns the new filtered array.
3144 { 'user': 'barney', 'age': 36, 'active': false },
3145 { 'user': 'fred', 'age': 40, 'active': true }
3148 _.reject(users, function(o) { return !o.active; });
3149 // => objects for ['fred']
3151 // The `_.matches` iteratee shorthand.
3152 _.reject(users, { 'age': 40, 'active': true });
3153 // => objects for ['barney']
3155 // The `_.matchesProperty` iteratee shorthand.
3156 _.reject(users, ['active', false]);
3157 // => objects for ['fred']
3159 // The `_.property` iteratee shorthand.
3160 _.reject(users, 'active');
3161 // => objects for ['barney']
3169 ### <a id="_samplecollection"></a>`_.sample(collection)`
3170 <a href="#_samplecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9068 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sample "See the npm package")
3172 Gets a random element from `collection`.
3177 1. `collection` *(Array|Object)*: The collection to sample.
3180 *(*)*: Returns the random element.
3184 _.sample([1, 2, 3, 4]);
3193 ### <a id="_samplesizecollection-n1"></a>`_.sampleSize(collection, [n=1])`
3194 <a href="#_samplesizecollection-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9095 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.samplesize "See the npm package")
3196 Gets `n` random elements at unique keys from `collection` up to the
3197 size of `collection`.
3202 1. `collection` *(Array|Object)*: The collection to sample.
3203 2. `[n=1]` *(number)*: The number of elements to sample.
3206 *(Array)*: Returns the random elements.
3210 _.sampleSize([1, 2, 3], 2);
3213 _.sampleSize([1, 2, 3], 4);
3222 ### <a id="_shufflecollection"></a>`_.shuffle(collection)`
3223 <a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9132 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.shuffle "See the npm package")
3225 Creates an array of shuffled values, using a version of the
3226 [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
3231 1. `collection` *(Array|Object)*: The collection to shuffle.
3234 *(Array)*: Returns the new shuffled array.
3238 _.shuffle([1, 2, 3, 4]);
3247 ### <a id="_sizecollection"></a>`_.size(collection)`
3248 <a href="#_sizecollection">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9157 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.size "See the npm package")
3250 Gets the size of `collection` by returning its length for array-like
3251 values or the number of own enumerable string keyed properties for objects.
3256 1. `collection` *(Array|Object)*: The collection to inspect.
3259 *(number)*: Returns the collection size.
3266 _.size({ 'a': 1, 'b': 2 });
3278 ### <a id="_somecollection-predicate_identity"></a>`_.some(collection, [predicate=_.identity])`
3279 <a href="#_somecollection-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9211 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.some "See the npm package")
3281 Checks if `predicate` returns truthy for **any** element of `collection`.
3282 Iteration is stopped once `predicate` returns truthy. The predicate is
3283 invoked with three arguments: *(value, index|key, collection)*.
3288 1. `collection` *(Array|Object)*: The collection to iterate over.
3289 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
3292 *(boolean)*: Returns `true` if any element passes the predicate check, else `false`.
3296 _.some([null, 0, 'yes', false], Boolean);
3300 { 'user': 'barney', 'active': true },
3301 { 'user': 'fred', 'active': false }
3304 // The `_.matches` iteratee shorthand.
3305 _.some(users, { 'user': 'barney', 'active': false });
3308 // The `_.matchesProperty` iteratee shorthand.
3309 _.some(users, ['active', false]);
3312 // The `_.property` iteratee shorthand.
3313 _.some(users, 'active');
3322 ### <a id="_sortbycollection-iteratees_identity"></a>`_.sortBy(collection, [iteratees=[_.identity]])`
3323 <a href="#_sortbycollection-iteratees_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9253 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sortby "See the npm package")
3325 Creates an array of elements, sorted in ascending order by the results of
3326 running each element in a collection thru each iteratee. This method
3327 performs a stable sort, that is, it preserves the original sort order of
3328 equal elements. The iteratees are invoked with one argument: *(value)*.
3333 1. `collection` *(Array|Object)*: The collection to iterate over.
3334 2. `[iteratees=[_.identity]]` *(...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[]))*: The iteratees to sort by.
3337 *(Array)*: Returns the new sorted array.
3342 { 'user': 'fred', 'age': 48 },
3343 { 'user': 'barney', 'age': 36 },
3344 { 'user': 'fred', 'age': 40 },
3345 { 'user': 'barney', 'age': 34 }
3348 _.sortBy(users, function(o) { return o.user; });
3349 // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
3351 _.sortBy(users, ['user', 'age']);
3352 // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
3354 _.sortBy(users, 'user', function(o) {
3355 return Math.floor(o.age / 10);
3357 // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
3371 ### <a id="_now"></a>`_.now()`
3372 <a href="#_now">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9288 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.now "See the npm package")
3374 Gets the timestamp of the number of milliseconds that have elapsed since
3375 the Unix epoch *(1 January `1970 00`:00:00 UTC)*.
3380 *(number)*: Returns the timestamp.
3384 _.defer(function(stamp) {
3385 console.log(_.now() - stamp);
3387 // => Logs the number of milliseconds it took for the deferred invocation.
3397 ## `“Function” Methods`
3401 ### <a id="_aftern-func"></a>`_.after(n, func)`
3402 <a href="#_aftern-func">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9318 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.after "See the npm package")
3404 The opposite of `_.before`; this method creates a function that invokes
3405 `func` once it's called `n` or more times.
3410 1. `n` *(number)*: The number of calls before `func` is invoked.
3411 2. `func` *(Function)*: The function to restrict.
3414 *(Function)*: Returns the new restricted function.
3418 var saves = ['profile', 'settings'];
3420 var done = _.after(saves.length, function() {
3421 console.log('done saving!');
3424 _.forEach(saves, function(type) {
3425 asyncSave({ 'type': type, 'complete': done });
3427 // => Logs 'done saving!' after the two async saves have completed.
3435 ### <a id="_aryfunc-nfunclength"></a>`_.ary(func, [n=func.length])`
3436 <a href="#_aryfunc-nfunclength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9347 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ary "See the npm package")
3438 Creates a function that invokes `func`, with up to `n` arguments,
3439 ignoring any additional arguments.
3444 1. `func` *(Function)*: The function to cap arguments for.
3445 2. `[n=func.length]` *(number)*: The arity cap.
3448 *(Function)*: Returns the new capped function.
3452 _.map(['6', '8', '10'], _.ary(parseInt, 1));
3461 ### <a id="_beforen-func"></a>`_.before(n, func)`
3462 <a href="#_beforen-func">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9370 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.before "See the npm package")
3464 Creates a function that invokes `func`, with the `this` binding and arguments
3465 of the created function, while it's called less than `n` times. Subsequent
3466 calls to the created function return the result of the last `func` invocation.
3471 1. `n` *(number)*: The number of calls at which `func` is no longer invoked.
3472 2. `func` *(Function)*: The function to restrict.
3475 *(Function)*: Returns the new restricted function.
3479 jQuery(element).on('click', _.before(5, addContactToList));
3480 // => allows adding up to 4 contacts to the list
3488 ### <a id="_bindfunc-thisarg-partials"></a>`_.bind(func, thisArg, [partials])`
3489 <a href="#_bindfunc-thisarg-partials">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9422 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bind "See the npm package")
3491 Creates a function that invokes `func` with the `this` binding of `thisArg`
3492 and `partials` prepended to the arguments it receives.
3495 The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
3496 may be used as a placeholder for partially applied arguments.
3499 **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
3500 property of bound functions.
3505 1. `func` *(Function)*: The function to bind.
3506 2. `thisArg` *(*)*: The `this` binding of `func`.
3507 3. `[partials]` *(...*)*: The arguments to be partially applied.
3510 *(Function)*: Returns the new bound function.
3514 var greet = function(greeting, punctuation) {
3515 return greeting + ' ' + this.user + punctuation;
3518 var object = { 'user': 'fred' };
3520 var bound = _.bind(greet, object, 'hi');
3524 // Bound with placeholders.
3525 var bound = _.bind(greet, object, _, '!');
3535 ### <a id="_bindkeyobject-key-partials"></a>`_.bindKey(object, key, [partials])`
3536 <a href="#_bindkeyobject-key-partials">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9476 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindkey "See the npm package")
3538 Creates a function that invokes the method at `object[key]` with `partials`
3539 prepended to the arguments it receives.
3542 This method differs from `_.bind` by allowing bound functions to reference
3543 methods that may be redefined or don't yet exist. See
3544 [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
3548 The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
3549 builds, may be used as a placeholder for partially applied arguments.
3554 1. `object` *(Object)*: The object to invoke the method on.
3555 2. `key` *(string)*: The key of the method.
3556 3. `[partials]` *(...*)*: The arguments to be partially applied.
3559 *(Function)*: Returns the new bound function.
3565 'greet': function(greeting, punctuation) {
3566 return greeting + ' ' + this.user + punctuation;
3570 var bound = _.bindKey(object, 'greet', 'hi');
3574 object.greet = function(greeting, punctuation) {
3575 return greeting + 'ya ' + this.user + punctuation;
3581 // Bound with placeholders.
3582 var bound = _.bindKey(object, 'greet', _, '!');
3592 ### <a id="_curryfunc-arityfunclength"></a>`_.curry(func, [arity=func.length])`
3593 <a href="#_curryfunc-arityfunclength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9526 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curry "See the npm package")
3595 Creates a function that accepts arguments of `func` and either invokes
3596 `func` returning its result, if at least `arity` number of arguments have
3597 been provided, or returns a function that accepts the remaining `func`
3598 arguments, and so on. The arity of `func` may be specified if `func.length`
3602 The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
3603 may be used as a placeholder for provided arguments.
3606 **Note:** This method doesn't set the "length" property of curried functions.
3611 1. `func` *(Function)*: The function to curry.
3612 2. `[arity=func.length]` *(number)*: The arity of `func`.
3615 *(Function)*: Returns the new curried function.
3619 var abc = function(a, b, c) {
3623 var curried = _.curry(abc);
3634 // Curried with placeholders.
3635 curried(1)(_, 3)(2);
3644 ### <a id="_curryrightfunc-arityfunclength"></a>`_.curryRight(func, [arity=func.length])`
3645 <a href="#_curryrightfunc-arityfunclength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9571 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.curryright "See the npm package")
3647 This method is like `_.curry` except that arguments are applied to `func`
3648 in the manner of `_.partialRight` instead of `_.partial`.
3651 The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
3652 builds, may be used as a placeholder for provided arguments.
3655 **Note:** This method doesn't set the "length" property of curried functions.
3660 1. `func` *(Function)*: The function to curry.
3661 2. `[arity=func.length]` *(number)*: The arity of `func`.
3664 *(Function)*: Returns the new curried function.
3668 var abc = function(a, b, c) {
3672 var curried = _.curryRight(abc);
3683 // Curried with placeholders.
3684 curried(3)(1, _)(2);
3693 ### <a id="_debouncefunc-wait0-options-optionsleadingfalse-optionsmaxwait-optionstrailingtrue"></a>`_.debounce(func, [wait=0], [options={}], [options.leading=false], [options.maxWait], [options.trailing=true])`
3694 <a href="#_debouncefunc-wait0-options-optionsleadingfalse-optionsmaxwait-optionstrailingtrue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9628 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.debounce "See the npm package")
3696 Creates a debounced function that delays invoking `func` until after `wait`
3697 milliseconds have elapsed since the last time the debounced function was
3698 invoked. The debounced function comes with a `cancel` method to cancel
3699 delayed `func` invocations and a `flush` method to immediately invoke them.
3700 Provide an options object to indicate whether `func` should be invoked on
3701 the leading and/or trailing edge of the `wait` timeout. The `func` is invoked
3702 with the last arguments provided to the debounced function. Subsequent calls
3703 to the debounced function return the result of the last `func` invocation.
3706 **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
3707 on the trailing edge of the timeout only if the debounced function is
3708 invoked more than once during the `wait` timeout.
3711 See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
3712 for details over the differences between `_.debounce` and `_.throttle`.
3717 1. `func` *(Function)*: The function to debounce.
3718 2. `[wait=0]` *(number)*: The number of milliseconds to delay.
3719 3. `[options={}]` *(Object)*: The options object.
3720 4. `[options.leading=false]` *(boolean)*: Specify invoking on the leading edge of the timeout.
3721 5. `[options.maxWait]` *(number)*: The maximum time `func` is allowed to be delayed before it's invoked.
3722 6. `[options.trailing=true]` *(boolean)*: Specify invoking on the trailing edge of the timeout.
3725 *(Function)*: Returns the new debounced function.
3729 // Avoid costly calculations while the window size is in flux.
3730 jQuery(window).on('resize', _.debounce(calculateLayout, 150));
3732 // Invoke `sendMail` when clicked, debouncing subsequent calls.
3733 jQuery(element).on('click', _.debounce(sendMail, 300, {
3738 // Ensure `batchLog` is invoked once after 1 second of debounced calls.
3739 var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
3740 var source = new EventSource('/stream');
3741 jQuery(source).on('message', debounced);
3743 // Cancel the trailing debounced invocation.
3744 jQuery(window).on('popstate', debounced.cancel);
3752 ### <a id="_deferfunc-args"></a>`_.defer(func, [args])`
3753 <a href="#_deferfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9765 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defer "See the npm package")
3755 Defers invoking the `func` until the current call stack has cleared. Any
3756 additional arguments are provided to `func` when it's invoked.
3761 1. `func` *(Function)*: The function to defer.
3762 2. `[args]` *(...*)*: The arguments to invoke `func` with.
3765 *(number)*: Returns the timer id.
3769 _.defer(function(text) {
3772 // => Logs 'deferred' after one or more milliseconds.
3780 ### <a id="_delayfunc-wait-args"></a>`_.delay(func, wait, [args])`
3781 <a href="#_delayfunc-wait-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9788 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.delay "See the npm package")
3783 Invokes `func` after `wait` milliseconds. Any additional arguments are
3784 provided to `func` when it's invoked.
3789 1. `func` *(Function)*: The function to delay.
3790 2. `wait` *(number)*: The number of milliseconds to delay invocation.
3791 3. `[args]` *(...*)*: The arguments to invoke `func` with.
3794 *(number)*: Returns the timer id.
3798 _.delay(function(text) {
3801 // => Logs 'later' after one second.
3809 ### <a id="_flipfunc"></a>`_.flip(func)`
3810 <a href="#_flipfunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9810 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flip "See the npm package")
3812 Creates a function that invokes `func` with arguments reversed.
3817 1. `func` *(Function)*: The function to flip arguments for.
3820 *(Function)*: Returns the new flipped function.
3824 var flipped = _.flip(function() {
3825 return _.toArray(arguments);
3828 flipped('a', 'b', 'c', 'd');
3829 // => ['d', 'c', 'b', 'a']
3837 ### <a id="_memoizefunc-resolver"></a>`_.memoize(func, [resolver])`
3838 <a href="#_memoizefunc-resolver">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9858 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.memoize "See the npm package")
3840 Creates a function that memoizes the result of `func`. If `resolver` is
3841 provided, it determines the cache key for storing the result based on the
3842 arguments provided to the memoized function. By default, the first argument
3843 provided to the memoized function is used as the map cache key. The `func`
3844 is invoked with the `this` binding of the memoized function.
3847 **Note:** The cache is exposed as the `cache` property on the memoized
3848 function. Its creation may be customized by replacing the `_.memoize.Cache`
3849 constructor with one whose instances implement the
3850 [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
3851 method interface of `delete`, `get`, `has`, and `set`.
3856 1. `func` *(Function)*: The function to have its output memoized.
3857 2. `[resolver]` *(Function)*: The function to resolve the cache key.
3860 *(Function)*: Returns the new memoized function.
3864 var object = { 'a': 1, 'b': 2 };
3865 var other = { 'c': 3, 'd': 4 };
3867 var values = _.memoize(_.values);
3878 // Modify the result cache.
3879 values.cache.set(object, ['a', 'b']);
3883 // Replace `_.memoize.Cache`.
3884 _.memoize.Cache = WeakMap;
3892 ### <a id="_negatepredicate"></a>`_.negate(predicate)`
3893 <a href="#_negatepredicate">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9901 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.negate "See the npm package")
3895 Creates a function that negates the result of the predicate `func`. The
3896 `func` predicate is invoked with the `this` binding and arguments of the
3902 1. `predicate` *(Function)*: The predicate to negate.
3905 *(Function)*: Returns the new negated function.
3909 function isEven(n) {
3913 _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
3922 ### <a id="_oncefunc"></a>`_.once(func)`
3923 <a href="#_oncefunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9928 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.once "See the npm package")
3925 Creates a function that is restricted to invoking `func` once. Repeat calls
3926 to the function return the value of the first invocation. The `func` is
3927 invoked with the `this` binding and arguments of the created function.
3932 1. `func` *(Function)*: The function to restrict.
3935 *(Function)*: Returns the new restricted function.
3939 var initialize = _.once(createApplication);
3942 // `initialize` invokes `createApplication` once
3950 ### <a id="_overargsfunc"></a>`_.overArgs(func)`
3951 <a href="#_overargsfunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9964 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overargs "See the npm package")
3953 Creates a function that invokes `func` with arguments transformed by
3954 corresponding `transforms`.
3959 1. `func` *(Function)*: The function to wrap.
3962 *(Function)*: Returns the new function.
3966 function doubled(n) {
3970 function square(n) {
3974 var func = _.overArgs(function(x, y) {
3976 }, [square, doubled]);
3990 ### <a id="_partialfunc-partials"></a>`_.partial(func, [partials])`
3991 <a href="#_partialfunc-partials">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10014 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partial "See the npm package")
3993 Creates a function that invokes `func` with `partials` prepended to the
3994 arguments it receives. This method is like `_.bind` except it does **not**
3995 alter the `this` binding.
3998 The `_.partial.placeholder` value, which defaults to `_` in monolithic
3999 builds, may be used as a placeholder for partially applied arguments.
4002 **Note:** This method doesn't set the "length" property of partially
4008 1. `func` *(Function)*: The function to partially apply arguments to.
4009 2. `[partials]` *(...*)*: The arguments to be partially applied.
4012 *(Function)*: Returns the new partially applied function.
4016 var greet = function(greeting, name) {
4017 return greeting + ' ' + name;
4020 var sayHelloTo = _.partial(greet, 'hello');
4024 // Partially applied with placeholders.
4025 var greetFred = _.partial(greet, _, 'fred');
4035 ### <a id="_partialrightfunc-partials"></a>`_.partialRight(func, [partials])`
4036 <a href="#_partialrightfunc-partials">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10051 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.partialright "See the npm package")
4038 This method is like `_.partial` except that partially applied arguments
4039 are appended to the arguments it receives.
4042 The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
4043 builds, may be used as a placeholder for partially applied arguments.
4046 **Note:** This method doesn't set the "length" property of partially
4052 1. `func` *(Function)*: The function to partially apply arguments to.
4053 2. `[partials]` *(...*)*: The arguments to be partially applied.
4056 *(Function)*: Returns the new partially applied function.
4060 var greet = function(greeting, name) {
4061 return greeting + ' ' + name;
4064 var greetFred = _.partialRight(greet, 'fred');
4068 // Partially applied with placeholders.
4069 var sayHelloTo = _.partialRight(greet, 'hello', _);
4079 ### <a id="_reargfunc-indexes"></a>`_.rearg(func, indexes)`
4080 <a href="#_reargfunc-indexes">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10078 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rearg "See the npm package")
4082 Creates a function that invokes `func` with arguments arranged according
4083 to the specified `indexes` where the argument value at the first index is
4084 provided as the first argument, the argument value at the second index is
4085 provided as the second argument, and so on.
4090 1. `func` *(Function)*: The function to rearrange arguments for.
4091 2. `indexes` *(...(number|number[]))*: The arranged argument indexes.
4094 *(Function)*: Returns the new function.
4098 var rearged = _.rearg(function(a, b, c) {
4102 rearged('b', 'c', 'a')
4103 // => ['a', 'b', 'c']
4111 ### <a id="_restfunc-startfunclength-1"></a>`_.rest(func, [start=func.length-1])`
4112 <a href="#_restfunc-startfunclength-1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10107 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rest "See the npm package")
4114 Creates a function that invokes `func` with the `this` binding of the
4115 created function and arguments from `start` and beyond provided as
4119 **Note:** This method is based on the
4120 [rest parameter](https://mdn.io/rest_parameters).
4125 1. `func` *(Function)*: The function to apply a rest parameter to.
4126 2. `[start=func.length-1]` *(number)*: The start position of the rest parameter.
4129 *(Function)*: Returns the new function.
4133 var say = _.rest(function(what, names) {
4134 return what + ' ' + _.initial(names).join(', ') +
4135 (_.size(names) > 1 ? ', & ' : '') + _.last(names);
4138 say('hello', 'fred', 'barney', 'pebbles');
4139 // => 'hello fred, barney, & pebbles'
4147 ### <a id="_spreadfunc-start0"></a>`_.spread(func, [start=0])`
4148 <a href="#_spreadfunc-start0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10170 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.spread "See the npm package")
4150 Creates a function that invokes `func` with the `this` binding of the
4151 create function and an array of arguments much like
4152 [`Function#apply`](http://www.ecma-international.org/ecma-262/6.0/#sec-function.prototype.apply).
4155 **Note:** This method is based on the
4156 [spread operator](https://mdn.io/spread_operator).
4161 1. `func` *(Function)*: The function to spread arguments over.
4162 2. `[start=0]` *(number)*: The start position of the spread.
4165 *(Function)*: Returns the new function.
4169 var say = _.spread(function(who, what) {
4170 return who + ' says ' + what;
4173 say(['fred', 'hello']);
4174 // => 'fred says hello'
4176 var numbers = Promise.all([
4177 Promise.resolve(40),
4181 numbers.then(_.spread(function(x, y) {
4184 // => a Promise of 76
4192 ### <a id="_throttlefunc-wait0-options-optionsleadingtrue-optionstrailingtrue"></a>`_.throttle(func, [wait=0], [options={}], [options.leading=true], [options.trailing=true])`
4193 <a href="#_throttlefunc-wait0-options-optionsleadingtrue-optionstrailingtrue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10227 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.throttle "See the npm package")
4195 Creates a throttled function that only invokes `func` at most once per
4196 every `wait` milliseconds. The throttled function comes with a `cancel`
4197 method to cancel delayed `func` invocations and a `flush` method to
4198 immediately invoke them. Provide an options object to indicate whether
4199 `func` should be invoked on the leading and/or trailing edge of the `wait`
4200 timeout. The `func` is invoked with the last arguments provided to the
4201 throttled function. Subsequent calls to the throttled function return the
4202 result of the last `func` invocation.
4205 **Note:** If `leading` and `trailing` options are `true`, `func` is
4206 invoked on the trailing edge of the timeout only if the throttled function
4207 is invoked more than once during the `wait` timeout.
4210 See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
4211 for details over the differences between `_.throttle` and `_.debounce`.
4216 1. `func` *(Function)*: The function to throttle.
4217 2. `[wait=0]` *(number)*: The number of milliseconds to throttle invocations to.
4218 3. `[options={}]` *(Object)*: The options object.
4219 4. `[options.leading=true]` *(boolean)*: Specify invoking on the leading edge of the timeout.
4220 5. `[options.trailing=true]` *(boolean)*: Specify invoking on the trailing edge of the timeout.
4223 *(Function)*: Returns the new throttled function.
4227 // Avoid excessively updating the position while scrolling.
4228 jQuery(window).on('scroll', _.throttle(updatePosition, 100));
4230 // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
4231 var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
4232 jQuery(element).on('click', throttled);
4234 // Cancel the trailing throttled invocation.
4235 jQuery(window).on('popstate', throttled.cancel);
4243 ### <a id="_unaryfunc"></a>`_.unary(func)`
4244 <a href="#_unaryfunc">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10260 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unary "See the npm package")
4246 Creates a function that accepts up to one argument, ignoring any
4247 additional arguments.
4252 1. `func` *(Function)*: The function to cap arguments for.
4255 *(Function)*: Returns the new capped function.
4259 _.map(['6', '8', '10'], _.unary(parseInt));
4268 ### <a id="_wrapvalue-wrapperidentity"></a>`_.wrap(value, [wrapper=identity])`
4269 <a href="#_wrapvalue-wrapperidentity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10286 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.wrap "See the npm package")
4271 Creates a function that provides `value` to the wrapper function as its
4272 first argument. Any additional arguments provided to the function are
4273 appended to those provided to the wrapper function. The wrapper is invoked
4274 with the `this` binding of the created function.
4279 1. `value` *(*)*: The value to wrap.
4280 2. `[wrapper=identity]` *(Function)*: The wrapper function.
4283 *(Function)*: Returns the new function.
4287 var p = _.wrap(_.escape, function(func, text) {
4288 return '<p>' + func(text) + '</p>';
4291 p('fred, barney, & pebbles');
4292 // => '<p>fred, barney, & pebbles</p>'
4306 ### <a id="_castarrayvalue"></a>`_.castArray(value)`
4307 <a href="#_castarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10326 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.castarray "See the npm package")
4309 Casts `value` as an array if it's not one.
4314 1. `value` *(*)*: The value to inspect.
4317 *(Array)*: Returns the cast array.
4324 _.castArray({ 'a': 1 });
4333 _.castArray(undefined);
4339 var array = [1, 2, 3];
4340 console.log(_.castArray(array) === array);
4349 ### <a id="_clonevalue"></a>`_.clone(value)`
4350 <a href="#_clonevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10360 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clone "See the npm package")
4352 Creates a shallow clone of `value`.
4355 **Note:** This method is loosely based on the
4356 [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
4357 and supports cloning arrays, array buffers, booleans, date objects, maps,
4358 numbers, `Object` objects, regexes, sets, strings, symbols, and typed
4359 arrays. The own enumerable properties of `arguments` objects are cloned
4360 as plain objects. An empty object is returned for uncloneable values such
4361 as error objects, functions, DOM nodes, and WeakMaps.
4366 1. `value` *(*)*: The value to clone.
4369 *(*)*: Returns the cloned value.
4373 var objects = [{ 'a': 1 }, { 'b': 2 }];
4375 var shallow = _.clone(objects);
4376 console.log(shallow[0] === objects[0]);
4385 ### <a id="_clonedeepvalue"></a>`_.cloneDeep(value)`
4386 <a href="#_clonedeepvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10417 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeep "See the npm package")
4388 This method is like `_.clone` except that it recursively clones `value`.
4393 1. `value` *(*)*: The value to recursively clone.
4396 *(*)*: Returns the deep cloned value.
4400 var objects = [{ 'a': 1 }, { 'b': 2 }];
4402 var deep = _.cloneDeep(objects);
4403 console.log(deep[0] === objects[0]);
4412 ### <a id="_clonedeepwithvalue-customizer"></a>`_.cloneDeepWith(value, [customizer])`
4413 <a href="#_clonedeepwithvalue-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10449 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package")
4415 This method is like `_.cloneWith` except that it recursively clones `value`.
4420 1. `value` *(*)*: The value to recursively clone.
4421 2. `[customizer]` *(Function)*: The function to customize cloning.
4424 *(*)*: Returns the deep cloned value.
4428 function customizer(value) {
4429 if (_.isElement(value)) {
4430 return value.cloneNode(true);
4434 var el = _.cloneDeepWith(document.body, customizer);
4436 console.log(el === document.body);
4438 console.log(el.nodeName);
4440 console.log(el.childNodes.length);
4449 ### <a id="_clonewithvalue-customizer"></a>`_.cloneWith(value, [customizer])`
4450 <a href="#_clonewithvalue-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10395 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clonewith "See the npm package")
4452 This method is like `_.clone` except that it accepts `customizer` which
4453 is invoked to produce the cloned value. If `customizer` returns `undefined`,
4454 cloning is handled by the method instead. The `customizer` is invoked with
4455 up to four arguments; *(value [, index|key, object, stack])*.
4460 1. `value` *(*)*: The value to clone.
4461 2. `[customizer]` *(Function)*: The function to customize cloning.
4464 *(*)*: Returns the cloned value.
4468 function customizer(value) {
4469 if (_.isElement(value)) {
4470 return value.cloneNode(false);
4474 var el = _.cloneWith(document.body, customizer);
4476 console.log(el === document.body);
4478 console.log(el.nodeName);
4480 console.log(el.childNodes.length);
4489 ### <a id="_eqvalue-other"></a>`_.eq(value, other)`
4490 <a href="#_eqvalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10485 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.eq "See the npm package")
4493 [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
4494 comparison between two values to determine if they are equivalent.
4499 1. `value` *(*)*: The value to compare.
4500 2. `other` *(*)*: The other value to compare.
4503 *(boolean)*: Returns `true` if the values are equivalent, else `false`.
4507 var object = { 'user': 'fred' };
4508 var other = { 'user': 'fred' };
4510 _.eq(object, object);
4513 _.eq(object, other);
4519 _.eq('a', Object('a'));
4531 ### <a id="_gtvalue-other"></a>`_.gt(value, other)`
4532 <a href="#_gtvalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10512 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gt "See the npm package")
4534 Checks if `value` is greater than `other`.
4539 1. `value` *(*)*: The value to compare.
4540 2. `other` *(*)*: The other value to compare.
4543 *(boolean)*: Returns `true` if `value` is greater than `other`, else `false`.
4562 ### <a id="_gtevalue-other"></a>`_.gte(value, other)`
4563 <a href="#_gtevalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10537 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.gte "See the npm package")
4565 Checks if `value` is greater than or equal to `other`.
4570 1. `value` *(*)*: The value to compare.
4571 2. `other` *(*)*: The other value to compare.
4574 *(boolean)*: Returns `true` if `value` is greater than or equal to `other`, else `false`.
4593 ### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
4594 <a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10559 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarguments "See the npm package")
4596 Checks if `value` is likely an `arguments` object.
4601 1. `value` *(*)*: The value to check.
4604 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4608 _.isArguments(function() { return arguments; }());
4611 _.isArguments([1, 2, 3]);
4620 ### <a id="_isarrayvalue"></a>`_.isArray(value)`
4621 <a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10590 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarray "See the npm package")
4623 Checks if `value` is classified as an `Array` object.
4628 1. `value` *(*)*: The value to check.
4631 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4635 _.isArray([1, 2, 3]);
4638 _.isArray(document.body.children);
4653 ### <a id="_isarraybuffervalue"></a>`_.isArrayBuffer(value)`
4654 <a href="#_isarraybuffervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10610 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package")
4656 Checks if `value` is classified as an `ArrayBuffer` object.
4661 1. `value` *(*)*: The value to check.
4664 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4668 _.isArrayBuffer(new ArrayBuffer(2));
4671 _.isArrayBuffer(new Array(2));
4680 ### <a id="_isarraylikevalue"></a>`_.isArrayLike(value)`
4681 <a href="#_isarraylikevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10639 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylike "See the npm package")
4683 Checks if `value` is array-like. A value is considered array-like if it's
4684 not a function and has a `value.length` that's an integer greater than or
4685 equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
4690 1. `value` *(*)*: The value to check.
4693 *(boolean)*: Returns `true` if `value` is array-like, else `false`.
4697 _.isArrayLike([1, 2, 3]);
4700 _.isArrayLike(document.body.children);
4703 _.isArrayLike('abc');
4706 _.isArrayLike(_.noop);
4715 ### <a id="_isarraylikeobjectvalue"></a>`_.isArrayLikeObject(value)`
4716 <a href="#_isarraylikeobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10668 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package")
4718 This method is like `_.isArrayLike` except that it also checks if `value`
4724 1. `value` *(*)*: The value to check.
4727 *(boolean)*: Returns `true` if `value` is an array-like object, else `false`.
4731 _.isArrayLikeObject([1, 2, 3]);
4734 _.isArrayLikeObject(document.body.children);
4737 _.isArrayLikeObject('abc');
4740 _.isArrayLikeObject(_.noop);
4749 ### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
4750 <a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10690 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isboolean "See the npm package")
4752 Checks if `value` is classified as a boolean primitive or object.
4757 1. `value` *(*)*: The value to check.
4760 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4776 ### <a id="_isbuffervalue"></a>`_.isBuffer(value)`
4777 <a href="#_isbuffervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10712 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isbuffer "See the npm package")
4779 Checks if `value` is a buffer.
4784 1. `value` *(*)*: The value to check.
4787 *(boolean)*: Returns `true` if `value` is a buffer, else `false`.
4791 _.isBuffer(new Buffer(2));
4794 _.isBuffer(new Uint8Array(2));
4803 ### <a id="_isdatevalue"></a>`_.isDate(value)`
4804 <a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10734 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isdate "See the npm package")
4806 Checks if `value` is classified as a `Date` object.
4811 1. `value` *(*)*: The value to check.
4814 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4821 _.isDate('Mon April 23 2012');
4830 ### <a id="_iselementvalue"></a>`_.isElement(value)`
4831 <a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10756 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iselement "See the npm package")
4833 Checks if `value` is likely a DOM element.
4838 1. `value` *(*)*: The value to check.
4841 *(boolean)*: Returns `true` if `value` is a DOM element, else `false`.
4845 _.isElement(document.body);
4848 _.isElement('<body>');
4857 ### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
4858 <a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10793 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isempty "See the npm package")
4860 Checks if `value` is an empty object, collection, map, or set.
4863 Objects are considered empty if they have no own enumerable string keyed
4867 Array-like values such as `arguments` objects, arrays, buffers, strings, or
4868 jQuery-like collections are considered empty if they have a `length` of `0`.
4869 Similarly, maps and sets are considered empty if they have a `size` of `0`.
4874 1. `value` *(*)*: The value to check.
4877 *(boolean)*: Returns `true` if `value` is empty, else `false`.
4890 _.isEmpty([1, 2, 3]);
4893 _.isEmpty({ 'a': 1 });
4902 ### <a id="_isequalvalue-other"></a>`_.isEqual(value, other)`
4903 <a href="#_isequalvalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10842 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequal "See the npm package")
4905 Performs a deep comparison between two values to determine if they are
4909 **Note:** This method supports comparing arrays, array buffers, booleans,
4910 date objects, error objects, maps, numbers, `Object` objects, regexes,
4911 sets, strings, symbols, and typed arrays. `Object` objects are compared
4912 by their own, not inherited, enumerable properties. Functions and DOM
4913 nodes are **not** supported.
4918 1. `value` *(*)*: The value to compare.
4919 2. `other` *(*)*: The other value to compare.
4922 *(boolean)*: Returns `true` if the values are equivalent, else `false`.
4926 var object = { 'user': 'fred' };
4927 var other = { 'user': 'fred' };
4929 _.isEqual(object, other);
4941 ### <a id="_isequalwithvalue-other-customizer"></a>`_.isEqualWith(value, other, [customizer])`
4942 <a href="#_isequalwithvalue-other-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10879 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isequalwith "See the npm package")
4944 This method is like `_.isEqual` except that it accepts `customizer` which
4945 is invoked to compare values. If `customizer` returns `undefined`, comparisons
4946 are handled by the method instead. The `customizer` is invoked with up to
4947 six arguments: *(objValue, othValue [, index|key, object, other, stack])*.
4952 1. `value` *(*)*: The value to compare.
4953 2. `other` *(*)*: The other value to compare.
4954 3. `[customizer]` *(Function)*: The function to customize comparisons.
4957 *(boolean)*: Returns `true` if the values are equivalent, else `false`.
4961 function isGreeting(value) {
4962 return /^h(?:i|ello)$/.test(value);
4965 function customizer(objValue, othValue) {
4966 if (isGreeting(objValue) && isGreeting(othValue)) {
4971 var array = ['hello', 'goodbye'];
4972 var other = ['hi', 'goodbye'];
4974 _.isEqualWith(array, other, customizer);
4983 ### <a id="_iserrorvalue"></a>`_.isError(value)`
4984 <a href="#_iserrorvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10904 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iserror "See the npm package")
4986 Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
4987 `SyntaxError`, `TypeError`, or `URIError` object.
4992 1. `value` *(*)*: The value to check.
4995 *(boolean)*: Returns `true` if `value` is an error object, else `false`.
4999 _.isError(new Error);
5011 ### <a id="_isfinitevalue"></a>`_.isFinite(value)`
5012 <a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10939 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfinite "See the npm package")
5014 Checks if `value` is a finite primitive number.
5017 **Note:** This method is based on
5018 [`Number.isFinite`](https://mdn.io/Number/isFinite).
5023 1. `value` *(*)*: The value to check.
5026 *(boolean)*: Returns `true` if `value` is a finite number, else `false`.
5033 _.isFinite(Number.MIN_VALUE);
5036 _.isFinite(Infinity);
5048 ### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
5049 <a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10961 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isfunction "See the npm package")
5051 Checks if `value` is classified as a `Function` object.
5056 1. `value` *(*)*: The value to check.
5059 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5066 _.isFunction(/abc/);
5075 ### <a id="_isintegervalue"></a>`_.isInteger(value)`
5076 <a href="#_isintegervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10995 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isinteger "See the npm package")
5078 Checks if `value` is an integer.
5081 **Note:** This method is based on
5082 [`Number.isInteger`](https://mdn.io/Number/isInteger).
5087 1. `value` *(*)*: The value to check.
5090 *(boolean)*: Returns `true` if `value` is an integer, else `false`.
5097 _.isInteger(Number.MIN_VALUE);
5100 _.isInteger(Infinity);
5112 ### <a id="_islengthvalue"></a>`_.isLength(value)`
5113 <a href="#_islengthvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11026 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.islength "See the npm package")
5115 Checks if `value` is a valid array-like length.
5118 **Note:** This function is loosely based on
5119 [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
5124 1. `value` *(*)*: The value to check.
5127 *(boolean)*: Returns `true` if `value` is a valid length, else `false`.
5134 _.isLength(Number.MIN_VALUE);
5137 _.isLength(Infinity);
5149 ### <a id="_ismapvalue"></a>`_.isMap(value)`
5150 <a href="#_ismapvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11107 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismap "See the npm package")
5152 Checks if `value` is classified as a `Map` object.
5157 1. `value` *(*)*: The value to check.
5160 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5167 _.isMap(new WeakMap);
5176 ### <a id="_ismatchobject-source"></a>`_.isMatch(object, source)`
5177 <a href="#_ismatchobject-source">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11135 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatch "See the npm package")
5179 Performs a partial deep comparison between `object` and `source` to
5180 determine if `object` contains equivalent property values. This method is
5181 equivalent to a `_.matches` function when `source` is partially applied.
5184 **Note:** This method supports comparing the same values as `_.isEqual`.
5189 1. `object` *(Object)*: The object to inspect.
5190 2. `source` *(Object)*: The object of property values to match.
5193 *(boolean)*: Returns `true` if `object` is a match, else `false`.
5197 var object = { 'user': 'fred', 'age': 40 };
5199 _.isMatch(object, { 'age': 40 });
5202 _.isMatch(object, { 'age': 36 });
5211 ### <a id="_ismatchwithobject-source-customizer"></a>`_.isMatchWith(object, source, [customizer])`
5212 <a href="#_ismatchwithobject-source-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11171 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package")
5214 This method is like `_.isMatch` except that it accepts `customizer` which
5215 is invoked to compare values. If `customizer` returns `undefined`, comparisons
5216 are handled by the method instead. The `customizer` is invoked with five
5217 arguments: *(objValue, srcValue, index|key, object, source)*.
5222 1. `object` *(Object)*: The object to inspect.
5223 2. `source` *(Object)*: The object of property values to match.
5224 3. `[customizer]` *(Function)*: The function to customize comparisons.
5227 *(boolean)*: Returns `true` if `object` is a match, else `false`.
5231 function isGreeting(value) {
5232 return /^h(?:i|ello)$/.test(value);
5235 function customizer(objValue, srcValue) {
5236 if (isGreeting(objValue) && isGreeting(srcValue)) {
5241 var object = { 'greeting': 'hello' };
5242 var source = { 'greeting': 'hi' };
5244 _.isMatchWith(object, source, customizer);
5253 ### <a id="_isnanvalue"></a>`_.isNaN(value)`
5254 <a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11204 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnan "See the npm package")
5256 Checks if `value` is `NaN`.
5259 **Note:** This method is based on
5260 [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
5261 global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
5262 `undefined` and other non-number values.
5267 1. `value` *(*)*: The value to check.
5270 *(boolean)*: Returns `true` if `value` is `NaN`, else `false`.
5277 _.isNaN(new Number(NaN));
5292 ### <a id="_isnativevalue"></a>`_.isNative(value)`
5293 <a href="#_isnativevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11237 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnative "See the npm package")
5295 Checks if `value` is a pristine native function.
5298 **Note:** This method can't reliably detect native functions in the
5299 presence of the `core-js` package because `core-js` circumvents this kind
5300 of detection. Despite multiple requests, the `core-js` maintainer has made
5301 it clear: any attempt to fix the detection will be obstructed. As a result,
5302 we're left with little choice but to throw an error. Unfortunately, this
5303 also affects packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
5304 which rely on `core-js`.
5309 1. `value` *(*)*: The value to check.
5312 *(boolean)*: Returns `true` if `value` is a native function, else `false`.
5316 _.isNative(Array.prototype.push);
5328 ### <a id="_isnilvalue"></a>`_.isNil(value)`
5329 <a href="#_isnilvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11285 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnil "See the npm package")
5331 Checks if `value` is `null` or `undefined`.
5336 1. `value` *(*)*: The value to check.
5339 *(boolean)*: Returns `true` if `value` is nullish, else `false`.
5358 ### <a id="_isnullvalue"></a>`_.isNull(value)`
5359 <a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11261 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnull "See the npm package")
5361 Checks if `value` is `null`.
5366 1. `value` *(*)*: The value to check.
5369 *(boolean)*: Returns `true` if `value` is `null`, else `false`.
5385 ### <a id="_isnumbervalue"></a>`_.isNumber(value)`
5386 <a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11316 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isnumber "See the npm package")
5388 Checks if `value` is classified as a `Number` primitive or object.
5391 **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
5392 classified as numbers, use the `_.isFinite` method.
5397 1. `value` *(*)*: The value to check.
5400 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5407 _.isNumber(Number.MIN_VALUE);
5410 _.isNumber(Infinity);
5422 ### <a id="_isobjectvalue"></a>`_.isObject(value)`
5423 <a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11056 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobject "See the npm package")
5425 Checks if `value` is the
5426 [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
5427 of `Object`. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
5432 1. `value` *(*)*: The value to check.
5435 *(boolean)*: Returns `true` if `value` is an object, else `false`.
5442 _.isObject([1, 2, 3]);
5457 ### <a id="_isobjectlikevalue"></a>`_.isObjectLike(value)`
5458 <a href="#_isobjectlikevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11085 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package")
5460 Checks if `value` is object-like. A value is object-like if it's not `null`
5461 and has a `typeof` result of "object".
5466 1. `value` *(*)*: The value to check.
5469 *(boolean)*: Returns `true` if `value` is object-like, else `false`.
5476 _.isObjectLike([1, 2, 3]);
5479 _.isObjectLike(_.noop);
5482 _.isObjectLike(null);
5491 ### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
5492 <a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11350 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isplainobject "See the npm package")
5494 Checks if `value` is a plain object, that is, an object created by the
5495 `Object` constructor or one with a `[[Prototype]]` of `null`.
5500 1. `value` *(*)*: The value to check.
5503 *(boolean)*: Returns `true` if `value` is a plain object, else `false`.
5511 _.isPlainObject(new Foo);
5514 _.isPlainObject([1, 2, 3]);
5517 _.isPlainObject({ 'x': 0, 'y': 0 });
5520 _.isPlainObject(Object.create(null));
5529 ### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
5530 <a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11382 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isregexp "See the npm package")
5532 Checks if `value` is classified as a `RegExp` object.
5537 1. `value` *(*)*: The value to check.
5540 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5547 _.isRegExp('/abc/');
5556 ### <a id="_issafeintegervalue"></a>`_.isSafeInteger(value)`
5557 <a href="#_issafeintegervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11414 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package")
5559 Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
5560 double precision number which isn't the result of a rounded unsafe integer.
5563 **Note:** This method is based on
5564 [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
5569 1. `value` *(*)*: The value to check.
5572 *(boolean)*: Returns `true` if `value` is a safe integer, else `false`.
5579 _.isSafeInteger(Number.MIN_VALUE);
5582 _.isSafeInteger(Infinity);
5585 _.isSafeInteger('3');
5594 ### <a id="_issetvalue"></a>`_.isSet(value)`
5595 <a href="#_issetvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11436 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isset "See the npm package")
5597 Checks if `value` is classified as a `Set` object.
5602 1. `value` *(*)*: The value to check.
5605 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5612 _.isSet(new WeakSet);
5621 ### <a id="_isstringvalue"></a>`_.isString(value)`
5622 <a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11458 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isstring "See the npm package")
5624 Checks if `value` is classified as a `String` primitive or object.
5629 1. `value` *(*)*: The value to check.
5632 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5648 ### <a id="_issymbolvalue"></a>`_.isSymbol(value)`
5649 <a href="#_issymbolvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11481 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.issymbol "See the npm package")
5651 Checks if `value` is classified as a `Symbol` primitive or object.
5656 1. `value` *(*)*: The value to check.
5659 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5663 _.isSymbol(Symbol.iterator);
5675 ### <a id="_istypedarrayvalue"></a>`_.isTypedArray(value)`
5676 <a href="#_istypedarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11504 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.istypedarray "See the npm package")
5678 Checks if `value` is classified as a typed array.
5683 1. `value` *(*)*: The value to check.
5686 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5690 _.isTypedArray(new Uint8Array);
5702 ### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
5703 <a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11526 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isundefined "See the npm package")
5705 Checks if `value` is `undefined`.
5710 1. `value` *(*)*: The value to check.
5713 *(boolean)*: Returns `true` if `value` is `undefined`, else `false`.
5717 _.isUndefined(void 0);
5720 _.isUndefined(null);
5729 ### <a id="_isweakmapvalue"></a>`_.isWeakMap(value)`
5730 <a href="#_isweakmapvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11548 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakmap "See the npm package")
5732 Checks if `value` is classified as a `WeakMap` object.
5737 1. `value` *(*)*: The value to check.
5740 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5744 _.isWeakMap(new WeakMap);
5747 _.isWeakMap(new Map);
5756 ### <a id="_isweaksetvalue"></a>`_.isWeakSet(value)`
5757 <a href="#_isweaksetvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11570 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.isweakset "See the npm package")
5759 Checks if `value` is classified as a `WeakSet` object.
5764 1. `value` *(*)*: The value to check.
5767 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5771 _.isWeakSet(new WeakSet);
5774 _.isWeakSet(new Set);
5783 ### <a id="_ltvalue-other"></a>`_.lt(value, other)`
5784 <a href="#_ltvalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11597 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lt "See the npm package")
5786 Checks if `value` is less than `other`.
5791 1. `value` *(*)*: The value to compare.
5792 2. `other` *(*)*: The other value to compare.
5795 *(boolean)*: Returns `true` if `value` is less than `other`, else `false`.
5814 ### <a id="_ltevalue-other"></a>`_.lte(value, other)`
5815 <a href="#_ltevalue-other">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11622 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lte "See the npm package")
5817 Checks if `value` is less than or equal to `other`.
5822 1. `value` *(*)*: The value to compare.
5823 2. `other` *(*)*: The other value to compare.
5826 *(boolean)*: Returns `true` if `value` is less than or equal to `other`, else `false`.
5845 ### <a id="_toarrayvalue"></a>`_.toArray(value)`
5846 <a href="#_toarrayvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11649 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toarray "See the npm package")
5848 Converts `value` to an array.
5853 1. `value` *(*)*: The value to convert.
5856 *(Array)*: Returns the converted array.
5860 _.toArray({ 'a': 1, 'b': 2 });
5864 // => ['a', 'b', 'c']
5878 ### <a id="_tofinitevalue"></a>`_.toFinite(value)`
5879 <a href="#_tofinitevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11688 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tofinite "See the npm package")
5881 Converts `value` to a finite number.
5886 1. `value` *(*)*: The value to convert.
5889 *(number)*: Returns the converted number.
5896 _.toFinite(Number.MIN_VALUE);
5899 _.toFinite(Infinity);
5900 // => 1.7976931348623157e+308
5911 ### <a id="_tointegervalue"></a>`_.toInteger(value)`
5912 <a href="#_tointegervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11726 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tointeger "See the npm package")
5914 Converts `value` to an integer.
5917 **Note:** This method is loosely based on
5918 [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
5923 1. `value` *(*)*: The value to convert.
5926 *(number)*: Returns the converted integer.
5933 _.toInteger(Number.MIN_VALUE);
5936 _.toInteger(Infinity);
5937 // => 1.7976931348623157e+308
5948 ### <a id="_tolengthvalue"></a>`_.toLength(value)`
5949 <a href="#_tolengthvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11760 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolength "See the npm package")
5951 Converts `value` to an integer suitable for use as the length of an
5955 **Note:** This method is based on
5956 [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
5961 1. `value` *(*)*: The value to convert.
5964 *(number)*: Returns the converted integer.
5971 _.toLength(Number.MIN_VALUE);
5974 _.toLength(Infinity);
5986 ### <a id="_tonumbervalue"></a>`_.toNumber(value)`
5987 <a href="#_tonumbervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11787 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tonumber "See the npm package")
5989 Converts `value` to a number.
5994 1. `value` *(*)*: The value to process.
5997 *(number)*: Returns the number.
6004 _.toNumber(Number.MIN_VALUE);
6007 _.toNumber(Infinity);
6019 ### <a id="_toplainobjectvalue"></a>`_.toPlainObject(value)`
6020 <a href="#_toplainobjectvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11832 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toplainobject "See the npm package")
6022 Converts `value` to a plain object flattening inherited enumerable string
6023 keyed properties of `value` to own properties of the plain object.
6028 1. `value` *(*)*: The value to convert.
6031 *(Object)*: Returns the converted plain object.
6039 Foo.prototype.c = 3;
6041 _.assign({ 'a': 1 }, new Foo);
6042 // => { 'a': 1, 'b': 2 }
6044 _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
6045 // => { 'a': 1, 'b': 2, 'c': 3 }
6053 ### <a id="_tosafeintegervalue"></a>`_.toSafeInteger(value)`
6054 <a href="#_tosafeintegervalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11860 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package")
6056 Converts `value` to a safe integer. A safe integer can be compared and
6057 represented correctly.
6062 1. `value` *(*)*: The value to convert.
6065 *(number)*: Returns the converted integer.
6069 _.toSafeInteger(3.2);
6072 _.toSafeInteger(Number.MIN_VALUE);
6075 _.toSafeInteger(Infinity);
6076 // => 9007199254740991
6078 _.toSafeInteger('3.2');
6087 ### <a id="_tostringvalue"></a>`_.toString(value)`
6088 <a href="#_tostringvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11885 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tostring "See the npm package")
6090 Converts `value` to a string. An empty string is returned for `null`
6091 and `undefined` values. The sign of `-0` is preserved.
6096 1. `value` *(*)*: The value to process.
6099 *(string)*: Returns the string.
6109 _.toString([1, 2, 3]);
6124 ### <a id="_addaugend-addend"></a>`_.add(augend, addend)`
6125 <a href="#_addaugend-addend">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15481 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.add "See the npm package")
6132 1. `augend` *(number)*: The first number in an addition.
6133 2. `addend` *(number)*: The second number in an addition.
6136 *(number)*: Returns the total.
6149 ### <a id="_ceilnumber-precision0"></a>`_.ceil(number, [precision=0])`
6150 <a href="#_ceilnumber-precision0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15506 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ceil "See the npm package")
6152 Computes `number` rounded up to `precision`.
6157 1. `number` *(number)*: The number to round up.
6158 2. `[precision=0]` *(number)*: The precision to round up to.
6161 *(number)*: Returns the rounded up number.
6180 ### <a id="_dividedividend-divisor"></a>`_.divide(dividend, divisor)`
6181 <a href="#_dividedividend-divisor">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15523 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.divide "See the npm package")
6188 1. `dividend` *(number)*: The first number in a division.
6189 2. `divisor` *(number)*: The second number in a division.
6192 *(number)*: Returns the quotient.
6205 ### <a id="_floornumber-precision0"></a>`_.floor(number, [precision=0])`
6206 <a href="#_floornumber-precision0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15548 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.floor "See the npm package")
6208 Computes `number` rounded down to `precision`.
6213 1. `number` *(number)*: The number to round down.
6214 2. `[precision=0]` *(number)*: The precision to round down to.
6217 *(number)*: Returns the rounded down number.
6236 ### <a id="_maxarray"></a>`_.max(array)`
6237 <a href="#_maxarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15568 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.max "See the npm package")
6239 Computes the maximum value of `array`. If `array` is empty or falsey,
6240 `undefined` is returned.
6245 1. `array` *(Array)*: The array to iterate over.
6248 *(*)*: Returns the maximum value.
6252 _.max([4, 2, 8, 6]);
6264 ### <a id="_maxbyarray-iteratee_identity"></a>`_.maxBy(array, [iteratee=_.identity])`
6265 <a href="#_maxbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15598 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.maxby "See the npm package")
6267 This method is like `_.max` except that it accepts `iteratee` which is
6268 invoked for each element in `array` to generate the criterion by which
6269 the value is ranked. The iteratee is invoked with one argument: *(value)*.
6274 1. `array` *(Array)*: The array to iterate over.
6275 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
6278 *(*)*: Returns the maximum value.
6282 var objects = [{ 'n': 1 }, { 'n': 2 }];
6284 _.maxBy(objects, function(o) { return o.n; });
6287 // The `_.property` iteratee shorthand.
6288 _.maxBy(objects, 'n');
6297 ### <a id="_meanarray"></a>`_.mean(array)`
6298 <a href="#_meanarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15618 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mean "See the npm package")
6300 Computes the mean of the values in `array`.
6305 1. `array` *(Array)*: The array to iterate over.
6308 *(number)*: Returns the mean.
6312 _.mean([4, 2, 8, 6]);
6321 ### <a id="_meanbyarray-iteratee_identity"></a>`_.meanBy(array, [iteratee=_.identity])`
6322 <a href="#_meanbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15646 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.meanby "See the npm package")
6324 This method is like `_.mean` except that it accepts `iteratee` which is
6325 invoked for each element in `array` to generate the value to be averaged.
6326 The iteratee is invoked with one argument: *(value)*.
6331 1. `array` *(Array)*: The array to iterate over.
6332 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
6335 *(number)*: Returns the mean.
6339 var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
6341 _.meanBy(objects, function(o) { return o.n; });
6344 // The `_.property` iteratee shorthand.
6345 _.meanBy(objects, 'n');
6354 ### <a id="_minarray"></a>`_.min(array)`
6355 <a href="#_minarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15668 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.min "See the npm package")
6357 Computes the minimum value of `array`. If `array` is empty or falsey,
6358 `undefined` is returned.
6363 1. `array` *(Array)*: The array to iterate over.
6366 *(*)*: Returns the minimum value.
6370 _.min([4, 2, 8, 6]);
6382 ### <a id="_minbyarray-iteratee_identity"></a>`_.minBy(array, [iteratee=_.identity])`
6383 <a href="#_minbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15698 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.minby "See the npm package")
6385 This method is like `_.min` except that it accepts `iteratee` which is
6386 invoked for each element in `array` to generate the criterion by which
6387 the value is ranked. The iteratee is invoked with one argument: *(value)*.
6392 1. `array` *(Array)*: The array to iterate over.
6393 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
6396 *(*)*: Returns the minimum value.
6400 var objects = [{ 'n': 1 }, { 'n': 2 }];
6402 _.minBy(objects, function(o) { return o.n; });
6405 // The `_.property` iteratee shorthand.
6406 _.minBy(objects, 'n');
6415 ### <a id="_multiplymultiplier-multiplicand"></a>`_.multiply(multiplier, multiplicand)`
6416 <a href="#_multiplymultiplier-multiplicand">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15719 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.multiply "See the npm package")
6418 Multiply two numbers.
6423 1. `multiplier` *(number)*: The first number in a multiplication.
6424 2. `multiplicand` *(number)*: The second number in a multiplication.
6427 *(number)*: Returns the product.
6440 ### <a id="_roundnumber-precision0"></a>`_.round(number, [precision=0])`
6441 <a href="#_roundnumber-precision0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15744 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.round "See the npm package")
6443 Computes `number` rounded to `precision`.
6448 1. `number` *(number)*: The number to round.
6449 2. `[precision=0]` *(number)*: The precision to round to.
6452 *(number)*: Returns the rounded number.
6471 ### <a id="_subtractminuend-subtrahend"></a>`_.subtract(minuend, subtrahend)`
6472 <a href="#_subtractminuend-subtrahend">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15761 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.subtract "See the npm package")
6474 Subtract two numbers.
6479 1. `minuend` *(number)*: The first number in a subtraction.
6480 2. `subtrahend` *(number)*: The second number in a subtraction.
6483 *(number)*: Returns the difference.
6496 ### <a id="_sumarray"></a>`_.sum(array)`
6497 <a href="#_sumarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15779 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sum "See the npm package")
6499 Computes the sum of the values in `array`.
6504 1. `array` *(Array)*: The array to iterate over.
6507 *(number)*: Returns the sum.
6511 _.sum([4, 2, 8, 6]);
6520 ### <a id="_sumbyarray-iteratee_identity"></a>`_.sumBy(array, [iteratee=_.identity])`
6521 <a href="#_sumbyarray-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15809 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.sumby "See the npm package")
6523 This method is like `_.sum` except that it accepts `iteratee` which is
6524 invoked for each element in `array` to generate the value to be summed.
6525 The iteratee is invoked with one argument: *(value)*.
6530 1. `array` *(Array)*: The array to iterate over.
6531 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
6534 *(number)*: Returns the sum.
6538 var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
6540 _.sumBy(objects, function(o) { return o.n; });
6543 // The `_.property` iteratee shorthand.
6544 _.sumBy(objects, 'n');
6555 ## `“Number” Methods`
6559 ### <a id="_clampnumber-lower-upper"></a>`_.clamp(number, [lower], upper)`
6560 <a href="#_clampnumber-lower-upper">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13306 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.clamp "See the npm package")
6562 Clamps `number` within the inclusive `lower` and `upper` bounds.
6567 1. `number` *(number)*: The number to clamp.
6568 2. `[lower]` *(number)*: The lower bound.
6569 3. `upper` *(number)*: The upper bound.
6572 *(number)*: Returns the clamped number.
6576 _.clamp(-10, -5, 5);
6588 ### <a id="_inrangenumber-start0-end"></a>`_.inRange(number, [start=0], end)`
6589 <a href="#_inrangenumber-start0-end">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13360 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.inrange "See the npm package")
6591 Checks if `n` is between `start` and up to, but not including, `end`. If
6592 `end` is not specified, it's set to `start` with `start` then set to `0`.
6593 If `start` is greater than `end` the params are swapped to support
6599 1. `number` *(number)*: The number to check.
6600 2. `[start=0]` *(number)*: The start of the range.
6601 3. `end` *(number)*: The end of the range.
6604 *(boolean)*: Returns `true` if `number` is in the range, else `false`.
6626 _.inRange(-3, -2, -6);
6635 ### <a id="_randomlower0-upper1-floating"></a>`_.random([lower=0], [upper=1], [floating])`
6636 <a href="#_randomlower0-upper1-floating">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13403 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.random "See the npm package")
6638 Produces a random number between the inclusive `lower` and `upper` bounds.
6639 If only one argument is provided a number between `0` and the given number
6640 is returned. If `floating` is `true`, or either `lower` or `upper` are
6641 floats, a floating-point number is returned instead of an integer.
6644 **Note:** JavaScript follows the IEEE-754 standard for resolving
6645 floating-point values which can produce unexpected results.
6650 1. `[lower=0]` *(number)*: The lower bound.
6651 2. `[upper=1]` *(number)*: The upper bound.
6652 3. `[floating]` *(boolean)*: Specify returning a floating-point number.
6655 *(number)*: Returns the random number.
6660 // => an integer between 0 and 5
6663 // => also an integer between 0 and 5
6666 // => a floating-point number between 0 and 5
6669 // => a floating-point number between 1.2 and 5.2
6679 ## `“Object” Methods`
6683 ### <a id="_assignobject-sources"></a>`_.assign(object, [sources])`
6684 <a href="#_assignobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11923 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assign "See the npm package")
6686 Assigns own enumerable string keyed properties of source objects to the
6687 destination object. Source objects are applied from left to right.
6688 Subsequent sources overwrite property assignments of previous sources.
6691 **Note:** This method mutates `object` and is loosely based on
6692 [`Object.assign`](https://mdn.io/Object/assign).
6697 1. `object` *(Object)*: The destination object.
6698 2. `[sources]` *(...Object)*: The source objects.
6701 *(Object)*: Returns `object`.
6713 Foo.prototype.d = 4;
6714 Bar.prototype.f = 6;
6716 _.assign({ 'a': 1 }, new Foo, new Bar);
6717 // => { 'a': 1, 'c': 3, 'e': 5 }
6725 ### <a id="_assigninobject-sources"></a>`_.assignIn(object, [sources])`
6726 <a href="#_assigninobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11966 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignin "See the npm package")
6728 This method is like `_.assign` except that it iterates over own and
6729 inherited source properties.
6732 **Note:** This method mutates `object`.
6740 1. `object` *(Object)*: The destination object.
6741 2. `[sources]` *(...Object)*: The source objects.
6744 *(Object)*: Returns `object`.
6756 Foo.prototype.c = 3;
6757 Bar.prototype.e = 5;
6759 _.assignIn({ 'a': 1 }, new Foo, new Bar);
6760 // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
6768 ### <a id="_assigninwithobject-sources-customizer"></a>`_.assignInWith(object, sources, [customizer])`
6769 <a href="#_assigninwithobject-sources-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12005 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assigninwith "See the npm package")
6771 This method is like `_.assignIn` except that it accepts `customizer`
6772 which is invoked to produce the assigned values. If `customizer` returns
6773 `undefined`, assignment is handled by the method instead. The `customizer`
6774 is invoked with five arguments: *(objValue, srcValue, key, object, source)*.
6777 **Note:** This method mutates `object`.
6785 1. `object` *(Object)*: The destination object.
6786 2. `sources` *(...Object)*: The source objects.
6787 3. `[customizer]` *(Function)*: The function to customize assigned values.
6790 *(Object)*: Returns `object`.
6794 function customizer(objValue, srcValue) {
6795 return _.isUndefined(objValue) ? srcValue : objValue;
6798 var defaults = _.partialRight(_.assignInWith, customizer);
6800 defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
6801 // => { 'a': 1, 'b': 2 }
6809 ### <a id="_assignwithobject-sources-customizer"></a>`_.assignWith(object, sources, [customizer])`
6810 <a href="#_assignwithobject-sources-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12037 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.assignwith "See the npm package")
6812 This method is like `_.assign` except that it accepts `customizer`
6813 which is invoked to produce the assigned values. If `customizer` returns
6814 `undefined`, assignment is handled by the method instead. The `customizer`
6815 is invoked with five arguments: *(objValue, srcValue, key, object, source)*.
6818 **Note:** This method mutates `object`.
6823 1. `object` *(Object)*: The destination object.
6824 2. `sources` *(...Object)*: The source objects.
6825 3. `[customizer]` *(Function)*: The function to customize assigned values.
6828 *(Object)*: Returns `object`.
6832 function customizer(objValue, srcValue) {
6833 return _.isUndefined(objValue) ? srcValue : objValue;
6836 var defaults = _.partialRight(_.assignWith, customizer);
6838 defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
6839 // => { 'a': 1, 'b': 2 }
6847 ### <a id="_atobject-paths"></a>`_.at(object, [paths])`
6848 <a href="#_atobject-paths">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12058 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.at "See the npm package")
6850 Creates an array of values corresponding to `paths` of `object`.
6855 1. `object` *(Object)*: The object to iterate over.
6856 2. `[paths]` *(...(string|string[]))*: The property paths of elements to pick.
6859 *(Array)*: Returns the picked values.
6863 var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
6865 _.at(object, ['a[0].b.c', 'a[1]']);
6874 ### <a id="_createprototype-properties"></a>`_.create(prototype, [properties])`
6875 <a href="#_createprototype-properties">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12096 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.create "See the npm package")
6877 Creates an object that inherits from the `prototype` object. If a
6878 `properties` object is given, its own enumerable string keyed properties
6879 are assigned to the created object.
6884 1. `prototype` *(Object)*: The object to inherit from.
6885 2. `[properties]` *(Object)*: The properties to assign to the object.
6888 *(Object)*: Returns the new object.
6901 Circle.prototype = _.create(Shape.prototype, {
6902 'constructor': Circle
6905 var circle = new Circle;
6906 circle instanceof Circle;
6909 circle instanceof Shape;
6918 ### <a id="_defaultsobject-sources"></a>`_.defaults(object, [sources])`
6919 <a href="#_defaultsobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12122 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaults "See the npm package")
6921 Assigns own and inherited enumerable string keyed properties of source
6922 objects to the destination object for all destination properties that
6923 resolve to `undefined`. Source objects are applied from left to right.
6924 Once a property is set, additional values of the same property are ignored.
6927 **Note:** This method mutates `object`.
6932 1. `object` *(Object)*: The destination object.
6933 2. `[sources]` *(...Object)*: The source objects.
6936 *(Object)*: Returns `object`.
6940 _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
6941 // => { 'user': 'barney', 'age': 36 }
6949 ### <a id="_defaultsdeepobject-sources"></a>`_.defaultsDeep(object, [sources])`
6950 <a href="#_defaultsdeepobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12147 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package")
6952 This method is like `_.defaults` except that it recursively assigns
6956 **Note:** This method mutates `object`.
6961 1. `object` *(Object)*: The destination object.
6962 2. `[sources]` *(...Object)*: The source objects.
6965 *(Object)*: Returns `object`.
6969 _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
6970 // => { 'user': { 'name': 'barney', 'age': 36 } }
6978 ### <a id="_findkeyobject-predicate_identity"></a>`_.findKey(object, [predicate=_.identity])`
6979 <a href="#_findkeyobject-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12188 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findkey "See the npm package")
6981 This method is like `_.find` except that it returns the key of the first
6982 element `predicate` returns truthy for instead of the element itself.
6987 1. `object` *(Object)*: The object to search.
6988 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
6991 *(*)*: Returns the key of the matched element, else `undefined`.
6996 'barney': { 'age': 36, 'active': true },
6997 'fred': { 'age': 40, 'active': false },
6998 'pebbles': { 'age': 1, 'active': true }
7001 _.findKey(users, function(o) { return o.age < 40; });
7002 // => 'barney' (iteration order is not guaranteed)
7004 // The `_.matches` iteratee shorthand.
7005 _.findKey(users, { 'age': 1, 'active': true });
7008 // The `_.matchesProperty` iteratee shorthand.
7009 _.findKey(users, ['active', false]);
7012 // The `_.property` iteratee shorthand.
7013 _.findKey(users, 'active');
7022 ### <a id="_findlastkeyobject-predicate_identity"></a>`_.findLastKey(object, [predicate=_.identity])`
7023 <a href="#_findlastkeyobject-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12228 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.findlastkey "See the npm package")
7025 This method is like `_.findKey` except that it iterates over elements of
7026 a collection in the opposite order.
7031 1. `object` *(Object)*: The object to search.
7032 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
7035 *(*)*: Returns the key of the matched element, else `undefined`.
7040 'barney': { 'age': 36, 'active': true },
7041 'fred': { 'age': 40, 'active': false },
7042 'pebbles': { 'age': 1, 'active': true }
7045 _.findLastKey(users, function(o) { return o.age < 40; });
7046 // => returns 'pebbles' assuming `_.findKey` returns 'barney'
7048 // The `_.matches` iteratee shorthand.
7049 _.findLastKey(users, { 'age': 36, 'active': true });
7052 // The `_.matchesProperty` iteratee shorthand.
7053 _.findLastKey(users, ['active', false]);
7056 // The `_.property` iteratee shorthand.
7057 _.findLastKey(users, 'active');
7066 ### <a id="_forinobject-iteratee_identity"></a>`_.forIn(object, [iteratee=_.identity])`
7067 <a href="#_forinobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12260 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forin "See the npm package")
7069 Iterates over own and inherited enumerable string keyed properties of an
7070 object and invokes `iteratee` for each property. The iteratee is invoked
7071 with three arguments: *(value, key, object)*. Iteratee functions may exit
7072 iteration early by explicitly returning `false`.
7077 1. `object` *(Object)*: The object to iterate over.
7078 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
7081 *(Object)*: Returns `object`.
7090 Foo.prototype.c = 3;
7092 _.forIn(new Foo, function(value, key) {
7095 // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
7103 ### <a id="_forinrightobject-iteratee_identity"></a>`_.forInRight(object, [iteratee=_.identity])`
7104 <a href="#_forinrightobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12292 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forinright "See the npm package")
7106 This method is like `_.forIn` except that it iterates over properties of
7107 `object` in the opposite order.
7112 1. `object` *(Object)*: The object to iterate over.
7113 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
7116 *(Object)*: Returns `object`.
7125 Foo.prototype.c = 3;
7127 _.forInRight(new Foo, function(value, key) {
7130 // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
7138 ### <a id="_forownobject-iteratee_identity"></a>`_.forOwn(object, [iteratee=_.identity])`
7139 <a href="#_forownobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12326 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forown "See the npm package")
7141 Iterates over own enumerable string keyed properties of an object and
7142 invokes `iteratee` for each property. The iteratee is invoked with three
7143 arguments: *(value, key, object)*. Iteratee functions may exit iteration
7144 early by explicitly returning `false`.
7149 1. `object` *(Object)*: The object to iterate over.
7150 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
7153 *(Object)*: Returns `object`.
7162 Foo.prototype.c = 3;
7164 _.forOwn(new Foo, function(value, key) {
7167 // => Logs 'a' then 'b' (iteration order is not guaranteed).
7175 ### <a id="_forownrightobject-iteratee_identity"></a>`_.forOwnRight(object, [iteratee=_.identity])`
7176 <a href="#_forownrightobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12356 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.forownright "See the npm package")
7178 This method is like `_.forOwn` except that it iterates over properties of
7179 `object` in the opposite order.
7184 1. `object` *(Object)*: The object to iterate over.
7185 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
7188 *(Object)*: Returns `object`.
7197 Foo.prototype.c = 3;
7199 _.forOwnRight(new Foo, function(value, key) {
7202 // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
7210 ### <a id="_functionsobject"></a>`_.functions(object)`
7211 <a href="#_functionsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12383 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functions "See the npm package")
7213 Creates an array of function property names from own enumerable properties
7219 1. `object` *(Object)*: The object to inspect.
7222 *(Array)*: Returns the function names.
7227 this.a = _.constant('a');
7228 this.b = _.constant('b');
7231 Foo.prototype.c = _.constant('c');
7233 _.functions(new Foo);
7242 ### <a id="_functionsinobject"></a>`_.functionsIn(object)`
7243 <a href="#_functionsinobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12410 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.functionsin "See the npm package")
7245 Creates an array of function property names from own and inherited
7246 enumerable properties of `object`.
7251 1. `object` *(Object)*: The object to inspect.
7254 *(Array)*: Returns the function names.
7259 this.a = _.constant('a');
7260 this.b = _.constant('b');
7263 Foo.prototype.c = _.constant('c');
7265 _.functionsIn(new Foo);
7266 // => ['a', 'b', 'c']
7274 ### <a id="_getobject-path-defaultvalue"></a>`_.get(object, path, [defaultValue])`
7275 <a href="#_getobject-path-defaultvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12439 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.get "See the npm package")
7277 Gets the value at `path` of `object`. If the resolved value is
7278 `undefined`, the `defaultValue` is used in its place.
7283 1. `object` *(Object)*: The object to query.
7284 2. `path` *(Array|string)*: The path of the property to get.
7285 3. `[defaultValue]` *(*)*: The value returned for `undefined` resolved values.
7288 *(*)*: Returns the resolved value.
7292 var object = { 'a': [{ 'b': { 'c': 3 } }] };
7294 _.get(object, 'a[0].b.c');
7297 _.get(object, ['a', '0', 'b', 'c']);
7300 _.get(object, 'a.b.c', 'default');
7309 ### <a id="_hasobject-path"></a>`_.has(object, path)`
7310 <a href="#_hasobject-path">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12471 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.has "See the npm package")
7312 Checks if `path` is a direct property of `object`.
7317 1. `object` *(Object)*: The object to query.
7318 2. `path` *(Array|string)*: The path to check.
7321 *(boolean)*: Returns `true` if `path` exists, else `false`.
7325 var object = { 'a': { 'b': 2 } };
7326 var other = _.create({ 'a': _.create({ 'b': 2 }) });
7331 _.has(object, 'a.b');
7334 _.has(object, ['a', 'b']);
7346 ### <a id="_hasinobject-path"></a>`_.hasIn(object, path)`
7347 <a href="#_hasinobject-path">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12501 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.hasin "See the npm package")
7349 Checks if `path` is a direct or inherited property of `object`.
7354 1. `object` *(Object)*: The object to query.
7355 2. `path` *(Array|string)*: The path to check.
7358 *(boolean)*: Returns `true` if `path` exists, else `false`.
7362 var object = _.create({ 'a': _.create({ 'b': 2 }) });
7364 _.hasIn(object, 'a');
7367 _.hasIn(object, 'a.b');
7370 _.hasIn(object, ['a', 'b']);
7373 _.hasIn(object, 'b');
7382 ### <a id="_invertobject"></a>`_.invert(object)`
7383 <a href="#_invertobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12523 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invert "See the npm package")
7385 Creates an object composed of the inverted keys and values of `object`.
7386 If `object` contains duplicate values, subsequent values overwrite
7387 property assignments of previous values.
7392 1. `object` *(Object)*: The object to invert.
7395 *(Object)*: Returns the new inverted object.
7399 var object = { 'a': 1, 'b': 2, 'c': 1 };
7402 // => { '1': 'c', '2': 'b' }
7410 ### <a id="_invertbyobject-iteratee_identity"></a>`_.invertBy(object, [iteratee=_.identity])`
7411 <a href="#_invertbyobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12554 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invertby "See the npm package")
7413 This method is like `_.invert` except that the inverted object is generated
7414 from the results of running each element of `object` thru `iteratee`. The
7415 corresponding inverted value of each inverted key is an array of keys
7416 responsible for generating the inverted value. The iteratee is invoked
7417 with one argument: *(value)*.
7422 1. `object` *(Object)*: The object to invert.
7423 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
7426 *(Object)*: Returns the new inverted object.
7430 var object = { 'a': 1, 'b': 2, 'c': 1 };
7433 // => { '1': ['a', 'c'], '2': ['b'] }
7435 _.invertBy(object, function(value) {
7436 return 'group' + value;
7438 // => { 'group1': ['a', 'c'], 'group2': ['b'] }
7446 ### <a id="_invokeobject-path-args"></a>`_.invoke(object, path, [args])`
7447 <a href="#_invokeobject-path-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12580 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.invoke "See the npm package")
7449 Invokes the method at `path` of `object`.
7454 1. `object` *(Object)*: The object to query.
7455 2. `path` *(Array|string)*: The path of the method to invoke.
7456 3. `[args]` *(...*)*: The arguments to invoke the method with.
7459 *(*)*: Returns the result of the invoked method.
7463 var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
7465 _.invoke(object, 'a[0].b.c.slice', 1, 3);
7474 ### <a id="_keysobject"></a>`_.keys(object)`
7475 <a href="#_keysobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12610 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keys "See the npm package")
7477 Creates an array of the own enumerable property names of `object`.
7480 **Note:** Non-object values are coerced to objects. See the
7481 [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
7487 1. `object` *(Object)*: The object to query.
7490 *(Array)*: Returns the array of property names.
7499 Foo.prototype.c = 3;
7502 // => ['a', 'b'] (iteration order is not guaranteed)
7513 ### <a id="_keysinobject"></a>`_.keysIn(object)`
7514 <a href="#_keysinobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12653 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.keysin "See the npm package")
7516 Creates an array of the own and inherited enumerable property names of `object`.
7519 **Note:** Non-object values are coerced to objects.
7524 1. `object` *(Object)*: The object to query.
7527 *(Array)*: Returns the array of property names.
7536 Foo.prototype.c = 3;
7539 // => ['a', 'b', 'c'] (iteration order is not guaranteed)
7547 ### <a id="_mapkeysobject-iteratee_identity"></a>`_.mapKeys(object, [iteratee=_.identity])`
7548 <a href="#_mapkeysobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12695 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapkeys "See the npm package")
7550 The opposite of `_.mapValues`; this method creates an object with the
7551 same values as `object` and keys generated by running each own enumerable
7552 string keyed property of `object` thru `iteratee`. The iteratee is invoked
7553 with three arguments: *(value, key, object)*.
7558 1. `object` *(Object)*: The object to iterate over.
7559 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
7562 *(Object)*: Returns the new mapped object.
7566 _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
7569 // => { 'a1': 1, 'b2': 2 }
7577 ### <a id="_mapvaluesobject-iteratee_identity"></a>`_.mapValues(object, [iteratee=_.identity])`
7578 <a href="#_mapvaluesobject-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12734 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mapvalues "See the npm package")
7580 Creates an object with the same keys as `object` and values generated
7581 by running each own enumerable string keyed property of `object` thru
7582 `iteratee`. The iteratee is invoked with three arguments:<br>
7583 *(value, key, object)*.
7588 1. `object` *(Object)*: The object to iterate over.
7589 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
7592 *(Object)*: Returns the new mapped object.
7597 'fred': { 'user': 'fred', 'age': 40 },
7598 'pebbles': { 'user': 'pebbles', 'age': 1 }
7601 _.mapValues(users, function(o) { return o.age; });
7602 // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
7604 // The `_.property` iteratee shorthand.
7605 _.mapValues(users, 'age');
7606 // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
7614 ### <a id="_mergeobject-sources"></a>`_.merge(object, [sources])`
7615 <a href="#_mergeobject-sources">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12775 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.merge "See the npm package")
7617 This method is like `_.assign` except that it recursively merges own and
7618 inherited enumerable string keyed properties of source objects into the
7619 destination object. Source properties that resolve to `undefined` are
7620 skipped if a destination value exists. Array and plain object properties
7621 are merged recursively. Other objects and value types are overridden by
7622 assignment. Source objects are applied from left to right. Subsequent
7623 sources overwrite property assignments of previous sources.
7626 **Note:** This method mutates `object`.
7631 1. `object` *(Object)*: The destination object.
7632 2. `[sources]` *(...Object)*: The source objects.
7635 *(Object)*: Returns `object`.
7640 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
7644 'data': [{ 'age': 36 }, { 'age': 40 }]
7647 _.merge(users, ages);
7648 // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
7656 ### <a id="_mergewithobject-sources-customizer"></a>`_.mergeWith(object, sources, customizer)`
7657 <a href="#_mergewithobject-sources-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12817 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mergewith "See the npm package")
7659 This method is like `_.merge` except that it accepts `customizer` which
7660 is invoked to produce the merged values of the destination and source
7661 properties. If `customizer` returns `undefined`, merging is handled by the
7662 method instead. The `customizer` is invoked with seven arguments:<br>
7663 *(objValue, srcValue, key, object, source, stack)*.
7666 **Note:** This method mutates `object`.
7671 1. `object` *(Object)*: The destination object.
7672 2. `sources` *(...Object)*: The source objects.
7673 3. `customizer` *(Function)*: The function to customize assigned values.
7676 *(Object)*: Returns `object`.
7680 function customizer(objValue, srcValue) {
7681 if (_.isArray(objValue)) {
7682 return objValue.concat(srcValue);
7687 'fruits': ['apple'],
7688 'vegetables': ['beet']
7692 'fruits': ['banana'],
7693 'vegetables': ['carrot']
7696 _.mergeWith(object, other, customizer);
7697 // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
7705 ### <a id="_omitobject-props"></a>`_.omit(object, [props])`
7706 <a href="#_omitobject-props">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12840 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omit "See the npm package")
7708 The opposite of `_.pick`; this method creates an object composed of the
7709 own and inherited enumerable string keyed properties of `object` that are
7715 1. `object` *(Object)*: The source object.
7716 2. `[props]` *(...(string|string[]))*: The property identifiers to omit.
7719 *(Object)*: Returns the new object.
7723 var object = { 'a': 1, 'b': '2', 'c': 3 };
7725 _.omit(object, ['a', 'c']);
7734 ### <a id="_omitbyobject-predicate_identity"></a>`_.omitBy(object, [predicate=_.identity])`
7735 <a href="#_omitbyobject-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12869 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.omitby "See the npm package")
7737 The opposite of `_.pickBy`; this method creates an object composed of
7738 the own and inherited enumerable string keyed properties of `object` that
7739 `predicate` doesn't return truthy for. The predicate is invoked with two
7740 arguments: *(value, key)*.
7745 1. `object` *(Object)*: The source object.
7746 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per property.
7749 *(Object)*: Returns the new object.
7753 var object = { 'a': 1, 'b': '2', 'c': 3 };
7755 _.omitBy(object, _.isNumber);
7764 ### <a id="_pickobject-props"></a>`_.pick(object, [props])`
7765 <a href="#_pickobject-props">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12893 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pick "See the npm package")
7767 Creates an object composed of the picked `object` properties.
7772 1. `object` *(Object)*: The source object.
7773 2. `[props]` *(...(string|string[]))*: The property identifiers to pick.
7776 *(Object)*: Returns the new object.
7780 var object = { 'a': 1, 'b': '2', 'c': 3 };
7782 _.pick(object, ['a', 'c']);
7783 // => { 'a': 1, 'c': 3 }
7791 ### <a id="_pickbyobject-predicate_identity"></a>`_.pickBy(object, [predicate=_.identity])`
7792 <a href="#_pickbyobject-predicate_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12916 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pickby "See the npm package")
7794 Creates an object composed of the `object` properties `predicate` returns
7795 truthy for. The predicate is invoked with two arguments: *(value, key)*.
7800 1. `object` *(Object)*: The source object.
7801 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per property.
7804 *(Object)*: Returns the new object.
7808 var object = { 'a': 1, 'b': '2', 'c': 3 };
7810 _.pickBy(object, _.isNumber);
7811 // => { 'a': 1, 'c': 3 }
7819 ### <a id="_resultobject-path-defaultvalue"></a>`_.result(object, path, [defaultValue])`
7820 <a href="#_resultobject-path-defaultvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12949 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.result "See the npm package")
7822 This method is like `_.get` except that if the resolved value is a
7823 function it's invoked with the `this` binding of its parent object and
7824 its result is returned.
7829 1. `object` *(Object)*: The object to query.
7830 2. `path` *(Array|string)*: The path of the property to resolve.
7831 3. `[defaultValue]` *(*)*: The value returned for `undefined` resolved values.
7834 *(*)*: Returns the resolved value.
7838 var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
7840 _.result(object, 'a[0].b.c1');
7843 _.result(object, 'a[0].b.c2');
7846 _.result(object, 'a[0].b.c3', 'default');
7849 _.result(object, 'a[0].b.c3', _.constant('default'));
7858 ### <a id="_setobject-path-value"></a>`_.set(object, path, value)`
7859 <a href="#_setobject-path-value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12999 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.set "See the npm package")
7861 Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
7862 it's created. Arrays are created for missing index properties while objects
7863 are created for all other missing properties. Use `_.setWith` to customize
7867 **Note:** This method mutates `object`.
7872 1. `object` *(Object)*: The object to modify.
7873 2. `path` *(Array|string)*: The path of the property to set.
7874 3. `value` *(*)*: The value to set.
7877 *(Object)*: Returns `object`.
7881 var object = { 'a': [{ 'b': { 'c': 3 } }] };
7883 _.set(object, 'a[0].b.c', 4);
7884 console.log(object.a[0].b.c);
7887 _.set(object, ['x', '0', 'y', 'z'], 5);
7888 console.log(object.x[0].y.z);
7897 ### <a id="_setwithobject-path-value-customizer"></a>`_.setWith(object, path, value, [customizer])`
7898 <a href="#_setwithobject-path-value-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13027 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.setwith "See the npm package")
7900 This method is like `_.set` except that it accepts `customizer` which is
7901 invoked to produce the objects of `path`. If `customizer` returns `undefined`
7902 path creation is handled by the method instead. The `customizer` is invoked
7903 with three arguments: *(nsValue, key, nsObject)*.
7906 **Note:** This method mutates `object`.
7911 1. `object` *(Object)*: The object to modify.
7912 2. `path` *(Array|string)*: The path of the property to set.
7913 3. `value` *(*)*: The value to set.
7914 4. `[customizer]` *(Function)*: The function to customize assigned values.
7917 *(Object)*: Returns `object`.
7923 _.setWith(object, '[0][1]', 'a', Object);
7924 // => { '0': { '1': 'a' } }
7932 ### <a id="_topairsobject"></a>`_.toPairs(object)`
7933 <a href="#_topairsobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13056 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairs "See the npm package")
7935 Creates an array of own enumerable string keyed-value pairs for `object`
7936 which can be consumed by `_.fromPairs`. If `object` is a map or set, its
7937 entries are returned.
7945 1. `object` *(Object)*: The object to query.
7948 *(Array)*: Returns the key-value pairs.
7957 Foo.prototype.c = 3;
7960 // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
7968 ### <a id="_topairsinobject"></a>`_.toPairsIn(object)`
7969 <a href="#_topairsinobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13082 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topairsin "See the npm package")
7971 Creates an array of own and inherited enumerable string keyed-value pairs
7972 for `object` which can be consumed by `_.fromPairs`. If `object` is a map
7973 or set, its entries are returned.
7981 1. `object` *(Object)*: The object to query.
7984 *(Array)*: Returns the key-value pairs.
7993 Foo.prototype.c = 3;
7995 _.toPairsIn(new Foo);
7996 // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
8004 ### <a id="_transformobject-iteratee_identity-accumulator"></a>`_.transform(object, [iteratee=_.identity], [accumulator])`
8005 <a href="#_transformobject-iteratee_identity-accumulator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13114 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.transform "See the npm package")
8007 An alternative to `_.reduce`; this method transforms `object` to a new
8008 `accumulator` object which is the result of running each of its own
8009 enumerable string keyed properties thru `iteratee`, with each invocation
8010 potentially mutating the `accumulator` object. If `accumulator` is not
8011 provided, a new object with the same `[[Prototype]]` will be used. The
8012 iteratee is invoked with four arguments: *(accumulator, value, key, object)*.
8013 Iteratee functions may exit iteration early by explicitly returning `false`.
8018 1. `object` *(Object)*: The object to iterate over.
8019 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
8020 3. `[accumulator]` *(*)*: The custom accumulator value.
8023 *(*)*: Returns the accumulated value.
8027 _.transform([2, 3, 4], function(result, n) {
8028 result.push(n *= n);
8033 _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
8034 (result[value] || (result[value] = [])).push(key);
8036 // => { '1': ['a', 'c'], '2': ['b'] }
8044 ### <a id="_unsetobject-path"></a>`_.unset(object, path)`
8045 <a href="#_unsetobject-path">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13163 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unset "See the npm package")
8047 Removes the property at `path` of `object`.
8050 **Note:** This method mutates `object`.
8055 1. `object` *(Object)*: The object to modify.
8056 2. `path` *(Array|string)*: The path of the property to unset.
8059 *(boolean)*: Returns `true` if the property is deleted, else `false`.
8063 var object = { 'a': [{ 'b': { 'c': 7 } }] };
8064 _.unset(object, 'a[0].b.c');
8067 console.log(object);
8068 // => { 'a': [{ 'b': {} }] };
8070 _.unset(object, ['a', '0', 'b', 'c']);
8073 console.log(object);
8074 // => { 'a': [{ 'b': {} }] };
8082 ### <a id="_updateobject-path-updater"></a>`_.update(object, path, updater)`
8083 <a href="#_updateobject-path-updater">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13194 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.update "See the npm package")
8085 This method is like `_.set` except that accepts `updater` to produce the
8086 value to set. Use `_.updateWith` to customize `path` creation. The `updater`
8087 is invoked with one argument: *(value)*.
8090 **Note:** This method mutates `object`.
8095 1. `object` *(Object)*: The object to modify.
8096 2. `path` *(Array|string)*: The path of the property to set.
8097 3. `updater` *(Function)*: The function to produce the updated value.
8100 *(Object)*: Returns `object`.
8104 var object = { 'a': [{ 'b': { 'c': 3 } }] };
8106 _.update(object, 'a[0].b.c', function(n) { return n * n; });
8107 console.log(object.a[0].b.c);
8110 _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
8111 console.log(object.x[0].y.z);
8120 ### <a id="_updatewithobject-path-updater-customizer"></a>`_.updateWith(object, path, updater, [customizer])`
8121 <a href="#_updatewithobject-path-updater-customizer">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13222 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.updatewith "See the npm package")
8123 This method is like `_.update` except that it accepts `customizer` which is
8124 invoked to produce the objects of `path`. If `customizer` returns `undefined`
8125 path creation is handled by the method instead. The `customizer` is invoked
8126 with three arguments: *(nsValue, key, nsObject)*.
8129 **Note:** This method mutates `object`.
8134 1. `object` *(Object)*: The object to modify.
8135 2. `path` *(Array|string)*: The path of the property to set.
8136 3. `updater` *(Function)*: The function to produce the updated value.
8137 4. `[customizer]` *(Function)*: The function to customize assigned values.
8140 *(Object)*: Returns `object`.
8146 _.updateWith(object, '[0][1]', _.constant('a'), Object);
8147 // => { '0': { '1': 'a' } }
8155 ### <a id="_valuesobject"></a>`_.values(object)`
8156 <a href="#_valuesobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13253 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.values "See the npm package")
8158 Creates an array of the own enumerable string keyed property values of `object`.
8161 **Note:** Non-object values are coerced to objects.
8166 1. `object` *(Object)*: The object to query.
8169 *(Array)*: Returns the array of property values.
8178 Foo.prototype.c = 3;
8181 // => [1, 2] (iteration order is not guaranteed)
8192 ### <a id="_valuesinobject"></a>`_.valuesIn(object)`
8193 <a href="#_valuesinobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13281 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.valuesin "See the npm package")
8195 Creates an array of the own and inherited enumerable string keyed property
8199 **Note:** Non-object values are coerced to objects.
8204 1. `object` *(Object)*: The object to query.
8207 *(Array)*: Returns the array of property values.
8216 Foo.prototype.c = 3;
8218 _.valuesIn(new Foo);
8219 // => [1, 2, 3] (iteration order is not guaranteed)
8233 ### <a id="_value"></a>`_(value)`
8234 <a href="#_value">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1464 "View in source") [Ⓣ][1]
8236 Creates a `lodash` object which wraps `value` to enable implicit method
8237 chain sequences. Methods that operate on and return arrays, collections,
8238 and functions can be chained together. Methods that retrieve a single value
8239 or may return a primitive value will automatically end the chain sequence
8240 and return the unwrapped value. Otherwise, the value must be unwrapped
8244 Explicit chain sequences, which must be unwrapped with `_#value`, may be
8245 enabled using `_.chain`.
8248 The execution of chained methods is lazy, that is, it's deferred until
8249 `_#value` is implicitly or explicitly called.
8252 Lazy evaluation allows several methods to support shortcut fusion.
8253 Shortcut fusion is an optimization to merge iteratee calls; this avoids
8254 the creation of intermediate arrays and can greatly reduce the number of
8255 iteratee executions. Sections of a chain sequence qualify for shortcut
8256 fusion if the section is applied to an array of at least `200` elements
8257 and any iteratees accept only one argument. The heuristic for whether a
8258 section qualifies for shortcut fusion is subject to change.
8261 Chaining is supported in custom builds as long as the `_#value` method is
8262 directly or indirectly included in the build.
8265 In addition to lodash methods, wrappers have `Array` and `String` methods.
8268 The wrapper `Array` methods are:<br>
8269 `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
8272 The wrapper `String` methods are:<br>
8273 `replace` and `split`
8276 The wrapper methods that support shortcut fusion are:<br>
8277 `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
8278 `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
8279 `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
8282 The chainable wrapper methods are:<br>
8283 `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
8284 `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
8285 `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
8286 `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
8287 `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
8288 `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
8289 `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
8290 `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
8291 `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
8292 `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
8293 `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
8294 `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
8295 `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
8296 `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
8297 `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
8298 `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
8299 `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
8300 `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
8301 `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
8302 `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
8303 `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
8304 `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
8305 `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
8306 `zipObject`, `zipObjectDeep`, and `zipWith`
8309 The wrapper methods that are **not** chainable by default are:<br>
8310 `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
8311 `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `divide`, `each`,
8312 `eachRight`, `endsWith`, `eq`, `escape`, `escapeRegExp`, `every`, `find`,
8313 `findIndex`, `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `first`,
8314 `floor`, `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`,
8315 `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`, `head`, `identity`,
8316 `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`, `isArray`,
8317 `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
8318 `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
8319 `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
8320 `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
8321 `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
8322 `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
8323 `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
8324 `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
8325 `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
8326 `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
8327 `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
8328 `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
8329 `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
8330 `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
8331 `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
8332 `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
8333 `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
8334 `upperFirst`, `value`, and `words`
8337 1. `value` *(*)*: The value to wrap in a `lodash` instance.
8340 *(Object)*: Returns the new `lodash` wrapper instance.
8344 function square(n) {
8348 var wrapped = _([1, 2, 3]);
8350 // Returns an unwrapped value.
8351 wrapped.reduce(_.add);
8354 // Returns a wrapped value.
8355 var squares = wrapped.map(square);
8360 _.isArray(squares.value());
8369 ### <a id="_chainvalue"></a>`_.chain(value)`
8370 <a href="#_chainvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8031 "View in source") [Ⓣ][1]
8372 Creates a `lodash` wrapper instance that wraps `value` with explicit method
8373 chain sequences enabled. The result of such sequences must be unwrapped
8379 1. `value` *(*)*: The value to wrap.
8382 *(Object)*: Returns the new `lodash` wrapper instance.
8387 { 'user': 'barney', 'age': 36 },
8388 { 'user': 'fred', 'age': 40 },
8389 { 'user': 'pebbles', 'age': 1 }
8396 return o.user + ' is ' + o.age;
8400 // => 'pebbles is 1'
8408 ### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
8409 <a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8060 "View in source") [Ⓣ][1]
8411 This method invokes `interceptor` and returns `value`. The interceptor
8412 is invoked with one argument; *(value)*. The purpose of this method is to
8413 "tap into" a method chain sequence in order to modify intermediate results.
8418 1. `value` *(*)*: The value to provide to `interceptor`.
8419 2. `interceptor` *(Function)*: The function to invoke.
8422 *(*)*: Returns `value`.
8427 .tap(function(array) {
8428 // Mutate input array.
8441 ### <a id="_thruvalue-interceptor"></a>`_.thru(value, interceptor)`
8442 <a href="#_thruvalue-interceptor">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8088 "View in source") [Ⓣ][1]
8444 This method is like `_.tap` except that it returns the result of `interceptor`.
8445 The purpose of this method is to "pass thru" values replacing intermediate
8446 results in a method chain sequence.
8451 1. `value` *(*)*: The value to provide to `interceptor`.
8452 2. `interceptor` *(Function)*: The function to invoke.
8455 *(*)*: Returns the result of `interceptor`.
8462 .thru(function(value) {
8474 ### <a id="_prototypesymboliterator"></a>`_.prototype[Symbol.iterator]()`
8475 <a href="#_prototypesymboliterator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8244 "View in source") [Ⓣ][1]
8477 Enables the wrapper to be iterable.
8482 *(Object)*: Returns the wrapper object.
8486 var wrapped = _([1, 2]);
8488 wrapped[Symbol.iterator]() === wrapped;
8491 Array.from(wrapped);
8500 ### <a id="_prototypeatpaths"></a>`_.prototype.at([paths])`
8501 <a href="#_prototypeatpaths">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8108 "View in source") [Ⓣ][1]
8503 This method is the wrapper version of `_.at`.
8508 1. `[paths]` *(...(string|string[]))*: The property paths of elements to pick.
8511 *(Object)*: Returns the new `lodash` wrapper instance.
8515 var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
8517 _(object).at(['a[0].b.c', 'a[1]']).value();
8526 ### <a id="_prototypechain"></a>`_.prototype.chain()`
8527 <a href="#_prototypechain">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8160 "View in source") [Ⓣ][1]
8529 Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
8534 *(Object)*: Returns the new `lodash` wrapper instance.
8539 { 'user': 'barney', 'age': 36 },
8540 { 'user': 'fred', 'age': 40 }
8543 // A sequence without explicit chaining.
8545 // => { 'user': 'barney', 'age': 36 }
8547 // A sequence with explicit chaining.
8553 // => { 'user': 'barney' }
8561 ### <a id="_prototypecommit"></a>`_.prototype.commit()`
8562 <a href="#_prototypecommit">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8190 "View in source") [Ⓣ][1]
8564 Executes the chain sequence and returns the wrapped result.
8569 *(Object)*: Returns the new `lodash` wrapper instance.
8574 var wrapped = _(array).push(3);
8579 wrapped = wrapped.commit();
8595 ### <a id="_prototypenext"></a>`_.prototype.next()`
8596 <a href="#_prototypenext">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8216 "View in source") [Ⓣ][1]
8598 Gets the next value on a wrapped object following the
8599 [iterator protocol](https://mdn.io/iteration_protocols#iterator).
8604 *(Object)*: Returns the next iterator value.
8608 var wrapped = _([1, 2]);
8611 // => { 'done': false, 'value': 1 }
8614 // => { 'done': false, 'value': 2 }
8617 // => { 'done': true, 'value': undefined }
8625 ### <a id="_prototypeplantvalue"></a>`_.prototype.plant(value)`
8626 <a href="#_prototypeplantvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8272 "View in source") [Ⓣ][1]
8628 Creates a clone of the chain sequence planting `value` as the wrapped value.
8633 1. `value` *(*)*: The value to plant.
8636 *(Object)*: Returns the new `lodash` wrapper instance.
8640 function square(n) {
8644 var wrapped = _([1, 2]).map(square);
8645 var other = wrapped.plant([3, 4]);
8659 ### <a id="_prototypereverse"></a>`_.prototype.reverse()`
8660 <a href="#_prototypereverse">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8312 "View in source") [Ⓣ][1]
8662 This method is the wrapper version of `_.reverse`.
8665 **Note:** This method mutates the wrapped array.
8670 *(Object)*: Returns the new `lodash` wrapper instance.
8674 var array = [1, 2, 3];
8676 _(array).reverse().value()
8688 ### <a id="_prototypevalue"></a>`_.prototype.value()`
8689 <a href="#_prototypevalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8344 "View in source") [Ⓣ][1]
8691 Executes the chain sequence to resolve the unwrapped value.
8696 *_.prototype.toJSON, _.prototype.valueOf*
8699 *(*)*: Returns the resolved unwrapped value.
8703 _([1, 2, 3]).value();
8714 ## `“String” Methods`
8718 ### <a id="_camelcasestring"></a>`_.camelCase([string=''])`
8719 <a href="#_camelcasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13464 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.camelcase "See the npm package")
8721 Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
8726 1. `[string='']` *(string)*: The string to convert.
8729 *(string)*: Returns the camel cased string.
8733 _.camelCase('Foo Bar');
8736 _.camelCase('--foo-bar--');
8739 _.camelCase('__FOO_BAR__');
8748 ### <a id="_capitalizestring"></a>`_.capitalize([string=''])`
8749 <a href="#_capitalizestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13484 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.capitalize "See the npm package")
8751 Converts the first character of `string` to upper case and the remaining
8757 1. `[string='']` *(string)*: The string to capitalize.
8760 *(string)*: Returns the capitalized string.
8764 _.capitalize('FRED');
8773 ### <a id="_deburrstring"></a>`_.deburr([string=''])`
8774 <a href="#_deburrstring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13505 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.deburr "See the npm package")
8776 Deburrs `string` by converting
8777 [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
8778 to basic latin letters and removing
8779 [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
8784 1. `[string='']` *(string)*: The string to deburr.
8787 *(string)*: Returns the deburred string.
8791 _.deburr('déjà vu');
8800 ### <a id="_endswithstring-target-positionstringlength"></a>`_.endsWith([string=''], [target], [position=string.length])`
8801 <a href="#_endswithstring-target-positionstringlength">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13533 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.endswith "See the npm package")
8803 Checks if `string` ends with the given target string.
8808 1. `[string='']` *(string)*: The string to search.
8809 2. `[target]` *(string)*: The string to search for.
8810 3. `[position=string.length]` *(number)*: The position to search up to.
8813 *(boolean)*: Returns `true` if `string` ends with `target`, else `false`.
8817 _.endsWith('abc', 'c');
8820 _.endsWith('abc', 'b');
8823 _.endsWith('abc', 'b', 2);
8832 ### <a id="_escapestring"></a>`_.escape([string=''])`
8833 <a href="#_escapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13580 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escape "See the npm package")
8835 Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
8836 their corresponding HTML entities.
8839 **Note:** No other characters are escaped. To escape additional
8840 characters use a third-party library like [_he_](https://mths.be/he).
8843 Though the ">" character is escaped for symmetry, characters like
8844 ">" and "/" don't need escaping in HTML and have no special meaning
8845 unless they're part of a tag or unquoted attribute value. See
8846 [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
8847 *(under "semi-related fun fact")* for more details.
8850 Backticks are escaped because in IE < `9`, they can break out of
8851 attribute values or HTML comments. See [#59](https://html5sec.org/#59),
8852 [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
8853 [#133](https://html5sec.org/#133) of the
8854 [HTML5 Security Cheatsheet](https://html5sec.org/) for more details.
8857 When working with HTML you should always
8858 [quote attribute values](http://wonko.com/post/html-escaping) to reduce
8864 1. `[string='']` *(string)*: The string to escape.
8867 *(string)*: Returns the escaped string.
8871 _.escape('fred, barney, & pebbles');
8872 // => 'fred, barney, & pebbles'
8880 ### <a id="_escaperegexpstring"></a>`_.escapeRegExp([string=''])`
8881 <a href="#_escaperegexpstring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13602 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package")
8883 Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
8884 "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
8889 1. `[string='']` *(string)*: The string to escape.
8892 *(string)*: Returns the escaped string.
8896 _.escapeRegExp('[lodash](https://lodash.com/)');
8897 // => '\[lodash\]\(https://lodash\.com/\)'
8905 ### <a id="_kebabcasestring"></a>`_.kebabCase([string=''])`
8906 <a href="#_kebabcasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13630 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.kebabcase "See the npm package")
8908 Converts `string` to
8909 [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
8914 1. `[string='']` *(string)*: The string to convert.
8917 *(string)*: Returns the kebab cased string.
8921 _.kebabCase('Foo Bar');
8924 _.kebabCase('fooBar');
8927 _.kebabCase('__FOO_BAR__');
8936 ### <a id="_lowercasestring"></a>`_.lowerCase([string=''])`
8937 <a href="#_lowercasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13654 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowercase "See the npm package")
8939 Converts `string`, as space separated words, to lower case.
8944 1. `[string='']` *(string)*: The string to convert.
8947 *(string)*: Returns the lower cased string.
8951 _.lowerCase('--Foo-Bar--');
8954 _.lowerCase('fooBar');
8957 _.lowerCase('__FOO_BAR__');
8966 ### <a id="_lowerfirststring"></a>`_.lowerFirst([string=''])`
8967 <a href="#_lowerfirststring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13675 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package")
8969 Converts the first character of `string` to lower case.
8974 1. `[string='']` *(string)*: The string to convert.
8977 *(string)*: Returns the converted string.
8981 _.lowerFirst('Fred');
8984 _.lowerFirst('FRED');
8993 ### <a id="_padstring-length0-chars"></a>`_.pad([string=''], [length=0], [chars=' '])`
8994 <a href="#_padstring-length0-chars">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13700 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.pad "See the npm package")
8996 Pads `string` on the left and right sides if it's shorter than `length`.
8997 Padding characters are truncated if they can't be evenly divided by `length`.
9002 1. `[string='']` *(string)*: The string to pad.
9003 2. `[length=0]` *(number)*: The padding length.
9004 3. `[chars=' ']` *(string)*: The string used as padding.
9007 *(string)*: Returns the padded string.
9014 _.pad('abc', 8, '_-');
9026 ### <a id="_padendstring-length0-chars"></a>`_.padEnd([string=''], [length=0], [chars=' '])`
9027 <a href="#_padendstring-length0-chars">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13739 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padend "See the npm package")
9029 Pads `string` on the right side if it's shorter than `length`. Padding
9030 characters are truncated if they exceed `length`.
9035 1. `[string='']` *(string)*: The string to pad.
9036 2. `[length=0]` *(number)*: The padding length.
9037 3. `[chars=' ']` *(string)*: The string used as padding.
9040 *(string)*: Returns the padded string.
9047 _.padEnd('abc', 6, '_-');
9059 ### <a id="_padstartstring-length0-chars"></a>`_.padStart([string=''], [length=0], [chars=' '])`
9060 <a href="#_padstartstring-length0-chars">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13772 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.padstart "See the npm package")
9062 Pads `string` on the left side if it's shorter than `length`. Padding
9063 characters are truncated if they exceed `length`.
9068 1. `[string='']` *(string)*: The string to pad.
9069 2. `[length=0]` *(number)*: The padding length.
9070 3. `[chars=' ']` *(string)*: The string used as padding.
9073 *(string)*: Returns the padded string.
9077 _.padStart('abc', 6);
9080 _.padStart('abc', 6, '_-');
9083 _.padStart('abc', 3);
9092 ### <a id="_parseintstring-radix10"></a>`_.parseInt(string, [radix=10])`
9093 <a href="#_parseintstring-radix10">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13806 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.parseint "See the npm package")
9095 Converts `string` to an integer of the specified radix. If `radix` is
9096 `undefined` or `0`, a `radix` of `10` is used unless `value` is a
9097 hexadecimal, in which case a `radix` of `16` is used.
9100 **Note:** This method aligns with the
9101 [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
9106 1. `string` *(string)*: The string to convert.
9107 2. `[radix=10]` *(number)*: The radix to interpret `value` by.
9110 *(number)*: Returns the converted integer.
9117 _.map(['6', '08', '10'], _.parseInt);
9126 ### <a id="_repeatstring-n1"></a>`_.repeat([string=''], [n=1])`
9127 <a href="#_repeatstring-n1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13840 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.repeat "See the npm package")
9129 Repeats the given string `n` times.
9134 1. `[string='']` *(string)*: The string to repeat.
9135 2. `[n=1]` *(number)*: The number of times to repeat the string.
9138 *(string)*: Returns the repeated string.
9157 ### <a id="_replacestring-pattern-replacement"></a>`_.replace([string=''], pattern, replacement)`
9158 <a href="#_replacestring-pattern-replacement">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13868 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.replace "See the npm package")
9160 Replaces matches for `pattern` in `string` with `replacement`.
9163 **Note:** This method is based on
9164 [`String#replace`](https://mdn.io/String/replace).
9169 1. `[string='']` *(string)*: The string to modify.
9170 2. `pattern` *(RegExp|string)*: The pattern to replace.
9171 3. `replacement` *(Function|string)*: The match replacement.
9174 *(string)*: Returns the modified string.
9178 _.replace('Hi Fred', 'Fred', 'Barney');
9187 ### <a id="_snakecasestring"></a>`_.snakeCase([string=''])`
9188 <a href="#_snakecasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13896 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.snakecase "See the npm package")
9190 Converts `string` to
9191 [snake case](https://en.wikipedia.org/wiki/Snake_case).
9196 1. `[string='']` *(string)*: The string to convert.
9199 *(string)*: Returns the snake cased string.
9203 _.snakeCase('Foo Bar');
9206 _.snakeCase('fooBar');
9209 _.snakeCase('--FOO-BAR--');
9218 ### <a id="_splitstring-separator-limit"></a>`_.split([string=''], separator, [limit])`
9219 <a href="#_splitstring-separator-limit">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13919 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.split "See the npm package")
9221 Splits `string` by `separator`.
9224 **Note:** This method is based on
9225 [`String#split`](https://mdn.io/String/split).
9230 1. `[string='']` *(string)*: The string to split.
9231 2. `separator` *(RegExp|string)*: The separator pattern to split by.
9232 3. `[limit]` *(number)*: The length to truncate results to.
9235 *(Array)*: Returns the string segments.
9239 _.split('a-b-c', '-', 2);
9248 ### <a id="_startcasestring"></a>`_.startCase([string=''])`
9249 <a href="#_startcasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13961 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startcase "See the npm package")
9251 Converts `string` to
9252 [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
9257 1. `[string='']` *(string)*: The string to convert.
9260 *(string)*: Returns the start cased string.
9264 _.startCase('--foo-bar--');
9267 _.startCase('fooBar');
9270 _.startCase('__FOO_BAR__');
9279 ### <a id="_startswithstring-target-position0"></a>`_.startsWith([string=''], [target], [position=0])`
9280 <a href="#_startswithstring-target-position0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13988 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.startswith "See the npm package")
9282 Checks if `string` starts with the given target string.
9287 1. `[string='']` *(string)*: The string to search.
9288 2. `[target]` *(string)*: The string to search for.
9289 3. `[position=0]` *(number)*: The position to search from.
9292 *(boolean)*: Returns `true` if `string` starts with `target`, else `false`.
9296 _.startsWith('abc', 'a');
9299 _.startsWith('abc', 'b');
9302 _.startsWith('abc', 'b', 1);
9311 ### <a id="_templatestring-options-optionsescape_templatesettingsescape-optionsevaluate_templatesettingsevaluate-optionsimports_templatesettingsimports-optionsinterpolate_templatesettingsinterpolate-optionssourceurllodashtemplatesourcesn-optionsvariableobj"></a>`_.template([string=''], [options={}], [options.escape=_.templateSettings.escape], [options.evaluate=_.templateSettings.evaluate], [options.imports=_.templateSettings.imports], [options.interpolate=_.templateSettings.interpolate], [options.sourceURL='lodash.templateSources[n]'], [options.variable='obj'])`
9312 <a href="#_templatestring-options-optionsescape_templatesettingsescape-optionsevaluate_templatesettingsevaluate-optionsimports_templatesettingsimports-optionsinterpolate_templatesettingsinterpolate-optionssourceurllodashtemplatesourcesn-optionsvariableobj">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14097 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.template "See the npm package")
9314 Creates a compiled template function that can interpolate data properties
9315 in "interpolate" delimiters, HTML-escape interpolated data properties in
9316 "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
9317 properties may be accessed as free variables in the template. If a setting
9318 object is given, it takes precedence over `_.templateSettings` values.
9321 **Note:** In the development build `_.template` utilizes
9322 [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
9323 for easier debugging.
9326 For more information on precompiling templates see
9327 [lodash's custom builds documentation](https://lodash.com/custom-builds).
9330 For more information on Chrome extension sandboxes see
9331 [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
9336 1. `[string='']` *(string)*: The template string.
9337 2. `[options={}]` *(Object)*: The options object.
9338 3. `[options.escape=_.templateSettings.escape]` *(RegExp)*: The HTML "escape" delimiter.
9339 4. `[options.evaluate=_.templateSettings.evaluate]` *(RegExp)*: The "evaluate" delimiter.
9340 5. `[options.imports=_.templateSettings.imports]` *(Object)*: An object to import into the template as free variables.
9341 6. `[options.interpolate=_.templateSettings.interpolate]` *(RegExp)*: The "interpolate" delimiter.
9342 7. `[options.sourceURL='lodash.templateSources[n]']` *(string)*: The sourceURL of the compiled template.
9343 8. `[options.variable='obj']` *(string)*: The data object variable name.
9346 *(Function)*: Returns the compiled template function.
9350 // Use the "interpolate" delimiter to create a compiled template.
9351 var compiled = _.template('hello <%= user %>!');
9352 compiled({ 'user': 'fred' });
9355 // Use the HTML "escape" delimiter to escape data property values.
9356 var compiled = _.template('<b><%- value %></b>');
9357 compiled({ 'value': '<script>' });
9358 // => '<b><script></b>'
9360 // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
9361 var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
9362 compiled({ 'users': ['fred', 'barney'] });
9363 // => '<li>fred</li><li>barney</li>'
9365 // Use the internal `print` function in "evaluate" delimiters.
9366 var compiled = _.template('<% print("hello " + user); %>!');
9367 compiled({ 'user': 'barney' });
9368 // => 'hello barney!'
9370 // Use the ES delimiter as an alternative to the default "interpolate" delimiter.
9371 var compiled = _.template('hello ${ user }!');
9372 compiled({ 'user': 'pebbles' });
9373 // => 'hello pebbles!'
9375 // Use backslashes to treat delimiters as plain text.
9376 var compiled = _.template('<%= "\\<%- value %\\>" %>');
9377 compiled({ 'value': 'ignored' });
9378 // => '<%- value %>'
9380 // Use the `imports` option to import `jQuery` as `jq`.
9381 var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
9382 var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
9383 compiled({ 'users': ['fred', 'barney'] });
9384 // => '<li>fred</li><li>barney</li>'
9386 // Use the `sourceURL` option to specify a custom sourceURL for the template.
9387 var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
9389 // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
9391 // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
9392 var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
9394 // => function(data) {
9395 // var __t, __p = '';
9396 // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
9400 // Use custom template delimiters.
9401 _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
9402 var compiled = _.template('hello {{ user }}!');
9403 compiled({ 'user': 'mustache' });
9404 // => 'hello mustache!'
9406 // Use the `source` property to inline compiled templates for meaningful
9407 // line numbers in error messages and stack traces.
9408 fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
9410 "main": ' + _.template(mainText).source + '\
9420 ### <a id="_tolowerstring"></a>`_.toLower([string=''])`
9421 <a href="#_tolowerstring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14226 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.tolower "See the npm package")
9423 Converts `string`, as a whole, to lower case just like
9424 [String#toLowerCase](https://mdn.io/toLowerCase).
9429 1. `[string='']` *(string)*: The string to convert.
9432 *(string)*: Returns the lower cased string.
9436 _.toLower('--Foo-Bar--');
9439 _.toLower('fooBar');
9442 _.toLower('__FOO_BAR__');
9451 ### <a id="_toupperstring"></a>`_.toUpper([string=''])`
9452 <a href="#_toupperstring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14251 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.toupper "See the npm package")
9454 Converts `string`, as a whole, to upper case just like
9455 [String#toUpperCase](https://mdn.io/toUpperCase).
9460 1. `[string='']` *(string)*: The string to convert.
9463 *(string)*: Returns the upper cased string.
9467 _.toUpper('--foo-bar--');
9470 _.toUpper('fooBar');
9473 _.toUpper('__foo_bar__');
9482 ### <a id="_trimstring-charswhitespace"></a>`_.trim([string=''], [chars=whitespace])`
9483 <a href="#_trimstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14277 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trim "See the npm package")
9485 Removes leading and trailing whitespace or specified characters from `string`.
9490 1. `[string='']` *(string)*: The string to trim.
9491 2. `[chars=whitespace]` *(string)*: The characters to trim.
9494 *(string)*: Returns the trimmed string.
9501 _.trim('-_-abc-_-', '_-');
9504 _.map([' foo ', ' bar '], _.trim);
9505 // => ['foo', 'bar']
9513 ### <a id="_trimendstring-charswhitespace"></a>`_.trimEnd([string=''], [chars=whitespace])`
9514 <a href="#_trimendstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14312 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimend "See the npm package")
9516 Removes trailing whitespace or specified characters from `string`.
9521 1. `[string='']` *(string)*: The string to trim.
9522 2. `[chars=whitespace]` *(string)*: The characters to trim.
9525 *(string)*: Returns the trimmed string.
9532 _.trimEnd('-_-abc-_-', '_-');
9541 ### <a id="_trimstartstring-charswhitespace"></a>`_.trimStart([string=''], [chars=whitespace])`
9542 <a href="#_trimstartstring-charswhitespace">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14345 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.trimstart "See the npm package")
9544 Removes leading whitespace or specified characters from `string`.
9549 1. `[string='']` *(string)*: The string to trim.
9550 2. `[chars=whitespace]` *(string)*: The characters to trim.
9553 *(string)*: Returns the trimmed string.
9557 _.trimStart(' abc ');
9560 _.trimStart('-_-abc-_-', '_-');
9569 ### <a id="_truncatestring-options-optionslength30-optionsomission-optionsseparator"></a>`_.truncate([string=''], [options={}], [options.length=30], [options.omission='...'], [options.separator])`
9570 <a href="#_truncatestring-options-optionslength30-optionsomission-optionsseparator">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14396 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.truncate "See the npm package")
9572 Truncates `string` if it's longer than the given maximum string length.
9573 The last characters of the truncated string are replaced with the omission
9574 string which defaults to "...".
9579 1. `[string='']` *(string)*: The string to truncate.
9580 2. `[options={}]` *(Object)*: The options object.
9581 3. `[options.length=30]` *(number)*: The maximum string length.
9582 4. `[options.omission='...']` *(string)*: The string to indicate text is omitted.
9583 5. `[options.separator]` *(RegExp|string)*: The separator pattern to truncate to.
9586 *(string)*: Returns the truncated string.
9590 _.truncate('hi-diddly-ho there, neighborino');
9591 // => 'hi-diddly-ho there, neighbo...'
9593 _.truncate('hi-diddly-ho there, neighborino', {
9597 // => 'hi-diddly-ho there,...'
9599 _.truncate('hi-diddly-ho there, neighborino', {
9603 // => 'hi-diddly-ho there...'
9605 _.truncate('hi-diddly-ho there, neighborino', {
9606 'omission': ' [...]'
9608 // => 'hi-diddly-ho there, neig [...]'
9616 ### <a id="_unescapestring"></a>`_.unescape([string=''])`
9617 <a href="#_unescapestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14471 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.unescape "See the npm package")
9619 The inverse of `_.escape`; this method converts the HTML entities
9620 `&`, `<`, `>`, `"`, `'`, and ``` in `string` to
9621 their corresponding characters.
9624 **Note:** No other HTML entities are unescaped. To unescape additional
9625 HTML entities use a third-party library like [_he_](https://mths.be/he).
9630 1. `[string='']` *(string)*: The string to unescape.
9633 *(string)*: Returns the unescaped string.
9637 _.unescape('fred, barney, & pebbles');
9638 // => 'fred, barney, & pebbles'
9646 ### <a id="_uppercasestring"></a>`_.upperCase([string=''])`
9647 <a href="#_uppercasestring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14498 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uppercase "See the npm package")
9649 Converts `string`, as space separated words, to upper case.
9654 1. `[string='']` *(string)*: The string to convert.
9657 *(string)*: Returns the upper cased string.
9661 _.upperCase('--foo-bar');
9664 _.upperCase('fooBar');
9667 _.upperCase('__foo_bar__');
9676 ### <a id="_upperfirststring"></a>`_.upperFirst([string=''])`
9677 <a href="#_upperfirststring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14519 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.upperfirst "See the npm package")
9679 Converts the first character of `string` to upper case.
9684 1. `[string='']` *(string)*: The string to convert.
9687 *(string)*: Returns the converted string.
9691 _.upperFirst('fred');
9694 _.upperFirst('FRED');
9703 ### <a id="_wordsstring-pattern"></a>`_.words([string=''], [pattern])`
9704 <a href="#_wordsstring-pattern">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14540 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.words "See the npm package")
9706 Splits `string` into an array of its words.
9711 1. `[string='']` *(string)*: The string to inspect.
9712 2. `[pattern]` *(RegExp|string)*: The pattern to match words.
9715 *(Array)*: Returns the words of `string`.
9719 _.words('fred, barney, & pebbles');
9720 // => ['fred', 'barney', 'pebbles']
9722 _.words('fred, barney, & pebbles', /[^, ]+/g);
9723 // => ['fred', 'barney', '&', 'pebbles']
9737 ### <a id="_attemptfunc-args"></a>`_.attempt(func, [args])`
9738 <a href="#_attemptfunc-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14574 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.attempt "See the npm package")
9740 Attempts to invoke `func`, returning either the result or the caught error
9741 object. Any additional arguments are provided to `func` when it's invoked.
9746 1. `func` *(Function)*: The function to attempt.
9747 2. `[args]` *(...*)*: The arguments to invoke `func` with.
9750 *(*)*: Returns the `func` result or error object.
9754 // Avoid throwing errors for invalid selectors.
9755 var elements = _.attempt(function(selector) {
9756 return document.querySelectorAll(selector);
9759 if (_.isError(elements)) {
9769 ### <a id="_bindallobject-methodnames"></a>`_.bindAll(object, methodNames)`
9770 <a href="#_bindallobject-methodnames">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14608 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.bindall "See the npm package")
9772 Binds methods of an object to the object itself, overwriting the existing
9776 **Note:** This method doesn't set the "length" property of bound functions.
9781 1. `object` *(Object)*: The object to bind and assign the bound methods to.
9782 2. `methodNames` *(...(string|string[]))*: The object method names to bind.
9785 *(Object)*: Returns `object`.
9791 'onClick': function() {
9792 console.log('clicked ' + this.label);
9796 _.bindAll(view, ['onClick']);
9797 jQuery(element).on('click', view.onClick);
9798 // => Logs 'clicked docs' when clicked.
9806 ### <a id="_condpairs"></a>`_.cond(pairs)`
9807 <a href="#_condpairs">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14645 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.cond "See the npm package")
9809 Creates a function that iterates over `pairs` and invokes the corresponding
9810 function of the first predicate to return truthy. The predicate-function
9811 pairs are invoked with the `this` binding and arguments of the created
9817 1. `pairs` *(Array)*: The predicate-function pairs.
9820 *(Function)*: Returns the new composite function.
9825 [_.matches({ 'a': 1 }), _.constant('matches A')],
9826 [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
9827 [_.constant(true), _.constant('no match')]
9830 func({ 'a': 1, 'b': 2 });
9833 func({ 'a': 0, 'b': 1 });
9836 func({ 'a': '1', 'b': '2' });
9845 ### <a id="_conformssource"></a>`_.conforms(source)`
9846 <a href="#_conformssource">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14688 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.conforms "See the npm package")
9848 Creates a function that invokes the predicate properties of `source` with
9849 the corresponding property values of a given object, returning `true` if
9850 all predicates return truthy, else `false`.
9855 1. `source` *(Object)*: The object of property predicates to conform to.
9858 *(Function)*: Returns the new spec function.
9863 { 'user': 'barney', 'age': 36 },
9864 { 'user': 'fred', 'age': 40 }
9867 _.filter(users, _.conforms({ 'age': function(n) { return n > 38; } }));
9868 // => [{ 'user': 'fred', 'age': 40 }]
9876 ### <a id="_constantvalue"></a>`_.constant(value)`
9877 <a href="#_constantvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14711 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.constant "See the npm package")
9879 Creates a function that returns `value`.
9884 1. `value` *(*)*: The value to return from the new function.
9887 *(Function)*: Returns the new constant function.
9891 var objects = _.times(2, _.constant({ 'a': 1 }));
9893 console.log(objects);
9894 // => [{ 'a': 1 }, { 'a': 1 }]
9896 console.log(objects[0] === objects[1]);
9905 ### <a id="_flowfuncs"></a>`_.flow([funcs])`
9906 <a href="#_flowfuncs">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14739 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flow "See the npm package")
9908 Creates a function that returns the result of invoking the given functions
9909 with the `this` binding of the created function, where each successive
9910 invocation is supplied the return value of the previous.
9915 1. `[funcs]` *(...(Function|Function[]))*: Functions to invoke.
9918 *(Function)*: Returns the new composite function.
9922 function square(n) {
9926 var addSquare = _.flow([_.add, square]);
9936 ### <a id="_flowrightfuncs"></a>`_.flowRight([funcs])`
9937 <a href="#_flowrightfuncs">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14762 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.flowright "See the npm package")
9939 This method is like `_.flow` except that it creates a function that
9940 invokes the given functions from right to left.
9945 1. `[funcs]` *(...(Function|Function[]))*: Functions to invoke.
9948 *(Function)*: Returns the new composite function.
9952 function square(n) {
9956 var addSquare = _.flowRight([square, _.add]);
9966 ### <a id="_identityvalue"></a>`_.identity(value)`
9967 <a href="#_identityvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14780 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.identity "See the npm package")
9969 This method returns the first argument given to it.
9974 1. `value` *(*)*: Any value.
9977 *(*)*: Returns `value`.
9981 var object = { 'user': 'fred' };
9983 console.log(_.identity(object) === object);
9992 ### <a id="_iterateefunc_identity"></a>`_.iteratee([func=_.identity])`
9993 <a href="#_iterateefunc_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14826 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.iteratee "See the npm package")
9995 Creates a function that invokes `func` with the arguments of the created
9996 function. If `func` is a property name, the created function returns the
9997 property value for a given element. If `func` is an array or object, the
9998 created function returns `true` for elements that contain the equivalent
9999 source properties, otherwise it returns `false`.
10004 1. `[func=_.identity]` *(*)*: The value to convert to a callback.
10007 *(Function)*: Returns the callback.
10012 { 'user': 'barney', 'age': 36, 'active': true },
10013 { 'user': 'fred', 'age': 40, 'active': false }
10016 // The `_.matches` iteratee shorthand.
10017 _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
10018 // => [{ 'user': 'barney', 'age': 36, 'active': true }]
10020 // The `_.matchesProperty` iteratee shorthand.
10021 _.filter(users, _.iteratee(['user', 'fred']));
10022 // => [{ 'user': 'fred', 'age': 40 }]
10024 // The `_.property` iteratee shorthand.
10025 _.map(users, _.iteratee('user'));
10026 // => ['barney', 'fred']
10028 // Create custom iteratee shorthands.
10029 _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
10030 return !_.isRegExp(func) ? iteratee(func) : function(string) {
10031 return func.test(string);
10035 _.filter(['abc', 'def'], /ef/);
10044 ### <a id="_matchessource"></a>`_.matches(source)`
10045 <a href="#_matchessource">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14854 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matches "See the npm package")
10047 Creates a function that performs a partial deep comparison between a given
10048 object and `source`, returning `true` if the given object has equivalent
10049 property values, else `false`. The created function is equivalent to
10050 `_.isMatch` with a `source` partially applied.
10053 **Note:** This method supports comparing the same values as `_.isEqual`.
10058 1. `source` *(Object)*: The object of property values to match.
10061 *(Function)*: Returns the new spec function.
10066 { 'user': 'barney', 'age': 36, 'active': true },
10067 { 'user': 'fred', 'age': 40, 'active': false }
10070 _.filter(users, _.matches({ 'age': 40, 'active': false }));
10071 // => [{ 'user': 'fred', 'age': 40, 'active': false }]
10079 ### <a id="_matchespropertypath-srcvalue"></a>`_.matchesProperty(path, srcValue)`
10080 <a href="#_matchespropertypath-srcvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14882 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package")
10082 Creates a function that performs a partial deep comparison between the
10083 value at `path` of a given object to `srcValue`, returning `true` if the
10084 object value is equivalent, else `false`.
10087 **Note:** This method supports comparing the same values as `_.isEqual`.
10092 1. `path` *(Array|string)*: The path of the property to get.
10093 2. `srcValue` *(*)*: The value to match.
10096 *(Function)*: Returns the new spec function.
10101 { 'user': 'barney' },
10105 _.find(users, _.matchesProperty('user', 'fred'));
10106 // => { 'user': 'fred' }
10114 ### <a id="_methodpath-args"></a>`_.method(path, [args])`
10115 <a href="#_methodpath-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14910 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.method "See the npm package")
10117 Creates a function that invokes the method at `path` of a given object.
10118 Any additional arguments are provided to the invoked method.
10123 1. `path` *(Array|string)*: The path of the method to invoke.
10124 2. `[args]` *(...*)*: The arguments to invoke the method with.
10127 *(Function)*: Returns the new invoker function.
10132 { 'a': { 'b': _.constant(2) } },
10133 { 'a': { 'b': _.constant(1) } }
10136 _.map(objects, _.method('a.b'));
10139 _.map(objects, _.method(['a', 'b']));
10148 ### <a id="_methodofobject-args"></a>`_.methodOf(object, [args])`
10149 <a href="#_methodofobject-args">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14939 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.methodof "See the npm package")
10151 The opposite of `_.method`; this method creates a function that invokes
10152 the method at a given path of `object`. Any additional arguments are
10153 provided to the invoked method.
10158 1. `object` *(Object)*: The object to query.
10159 2. `[args]` *(...*)*: The arguments to invoke the method with.
10162 *(Function)*: Returns the new invoker function.
10166 var array = _.times(3, _.constant),
10167 object = { 'a': array, 'b': array, 'c': array };
10169 _.map(['a[2]', 'c[0]'], _.methodOf(object));
10172 _.map([['a', '2'], ['c', '0']], _.methodOf(object));
10181 ### <a id="_mixinobjectlodash-source-options-optionschaintrue"></a>`_.mixin([object=lodash], source, [options={}], [options.chain=true])`
10182 <a href="#_mixinobjectlodash-source-options-optionschaintrue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14981 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.mixin "See the npm package")
10184 Adds all own enumerable string keyed function properties of a source
10185 object to the destination object. If `object` is a function, then methods
10186 are added to its prototype as well.
10189 **Note:** Use `_.runInContext` to create a pristine `lodash` function to
10190 avoid conflicts caused by modifying the original.
10195 1. `[object=lodash]` *(Function|Object)*: The destination object.
10196 2. `source` *(Object)*: The object of functions to add.
10197 3. `[options={}]` *(Object)*: The options object.
10198 4. `[options.chain=true]` *(boolean)*: Specify whether mixins are chainable.
10201 *(*)*: Returns `object`.
10205 function vowels(string) {
10206 return _.filter(string, function(v) {
10207 return /[aeiou]/i.test(v);
10211 _.mixin({ 'vowels': vowels });
10215 _('fred').vowels().value();
10218 _.mixin({ 'vowels': vowels }, { 'chain': false });
10219 _('fred').vowels();
10228 ### <a id="_noconflict"></a>`_.noConflict()`
10229 <a href="#_noconflict">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15030 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noconflict "See the npm package")
10231 Reverts the `_` variable to its previous value and returns a reference to
10232 the `lodash` function.
10237 *(Function)*: Returns the `lodash` function.
10241 var lodash = _.noConflict();
10249 ### <a id="_noop"></a>`_.noop()`
10250 <a href="#_noop">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15049 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.noop "See the npm package")
10252 A method that returns `undefined`.
10258 _.times(2, _.noop);
10259 // => [undefined, undefined]
10267 ### <a id="_nthargn0"></a>`_.nthArg([n=0])`
10268 <a href="#_nthargn0">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15073 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.ntharg "See the npm package")
10270 Creates a function that gets the argument at index `n`. If `n` is negative,
10271 the nth argument from the end is returned.
10276 1. `[n=0]` *(number)*: The index of the argument to return.
10279 *(Function)*: Returns the new pass-thru function.
10283 var func = _.nthArg(1);
10284 func('a', 'b', 'c', 'd');
10287 var func = _.nthArg(-2);
10288 func('a', 'b', 'c', 'd');
10297 ### <a id="_overiteratees_identity"></a>`_.over([iteratees=[_.identity]])`
10298 <a href="#_overiteratees_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15098 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.over "See the npm package")
10300 Creates a function that invokes `iteratees` with the arguments it receives
10301 and returns their results.
10306 1. `[iteratees=[_.identity]]` *(...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[]))*: The iteratees to invoke.
10309 *(Function)*: Returns the new function.
10313 var func = _.over([Math.max, Math.min]);
10324 ### <a id="_overeverypredicates_identity"></a>`_.overEvery([predicates=[_.identity]])`
10325 <a href="#_overeverypredicates_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15124 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.overevery "See the npm package")
10327 Creates a function that checks if **all** of the `predicates` return
10328 truthy when invoked with the arguments it receives.
10333 1. `[predicates=[_.identity]]` *(...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[]))*: The predicates to check.
10336 *(Function)*: Returns the new function.
10340 var func = _.overEvery([Boolean, isFinite]);
10357 ### <a id="_oversomepredicates_identity"></a>`_.overSome([predicates=[_.identity]])`
10358 <a href="#_oversomepredicates_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15150 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.oversome "See the npm package")
10360 Creates a function that checks if **any** of the `predicates` return
10361 truthy when invoked with the arguments it receives.
10366 1. `[predicates=[_.identity]]` *(...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[]))*: The predicates to check.
10369 *(Function)*: Returns the new function.
10373 var func = _.overSome([Boolean, isFinite]);
10390 ### <a id="_propertypath"></a>`_.property(path)`
10391 <a href="#_propertypath">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15174 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.property "See the npm package")
10393 Creates a function that returns the value at `path` of a given object.
10398 1. `path` *(Array|string)*: The path of the property to get.
10401 *(Function)*: Returns the new accessor function.
10406 { 'a': { 'b': 2 } },
10407 { 'a': { 'b': 1 } }
10410 _.map(objects, _.property('a.b'));
10413 _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
10422 ### <a id="_propertyofobject"></a>`_.propertyOf(object)`
10423 <a href="#_propertyofobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15199 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.propertyof "See the npm package")
10425 The opposite of `_.property`; this method creates a function that returns
10426 the value at a given path of `object`.
10431 1. `object` *(Object)*: The object to query.
10434 *(Function)*: Returns the new accessor function.
10438 var array = [0, 1, 2],
10439 object = { 'a': array, 'b': array, 'c': array };
10441 _.map(['a[2]', 'c[0]'], _.propertyOf(object));
10444 _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
10453 ### <a id="_rangestart0-end-step1"></a>`_.range([start=0], end, [step=1])`
10454 <a href="#_rangestart0-end-step1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15246 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.range "See the npm package")
10456 Creates an array of numbers *(positive and/or negative)* progressing from
10457 `start` up to, but not including, `end`. A step of `-1` is used if a negative
10458 `start` is specified without an `end` or `step`. If `end` is not specified,
10459 it's set to `start` with `start` then set to `0`.
10462 **Note:** JavaScript follows the IEEE-754 standard for resolving
10463 floating-point values which can produce unexpected results.
10468 1. `[start=0]` *(number)*: The start of the range.
10469 2. `end` *(number)*: The end of the range.
10470 3. `[step=1]` *(number)*: The value to increment or decrement by.
10473 *(Array)*: Returns the range of numbers.
10481 // => [0, -1, -2, -3]
10487 // => [0, 5, 10, 15]
10489 _.range(0, -4, -1);
10490 // => [0, -1, -2, -3]
10504 ### <a id="_rangerightstart0-end-step1"></a>`_.rangeRight([start=0], end, [step=1])`
10505 <a href="#_rangerightstart0-end-step1">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15284 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.rangeright "See the npm package")
10507 This method is like `_.range` except that it populates values in
10513 1. `[start=0]` *(number)*: The start of the range.
10514 2. `end` *(number)*: The end of the range.
10515 3. `[step=1]` *(number)*: The value to increment or decrement by.
10518 *(Array)*: Returns the range of numbers.
10526 // => [-3, -2, -1, 0]
10528 _.rangeRight(1, 5);
10531 _.rangeRight(0, 20, 5);
10532 // => [15, 10, 5, 0]
10534 _.rangeRight(0, -4, -1);
10535 // => [-3, -2, -1, 0]
10537 _.rangeRight(1, 4, 0);
10549 ### <a id="_runincontextcontextroot"></a>`_.runInContext([context=root])`
10550 <a href="#_runincontextcontextroot">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1234 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.runincontext "See the npm package")
10552 Create a new pristine `lodash` function using the `context` object.
10557 1. `[context=root]` *(Object)*: The context object.
10560 *(Function)*: Returns a new `lodash` function.
10564 _.mixin({ 'foo': _.constant('foo') });
10566 var lodash = _.runInContext();
10567 lodash.mixin({ 'bar': lodash.constant('bar') });
10569 _.isFunction(_.foo);
10571 _.isFunction(_.bar);
10574 lodash.isFunction(lodash.foo);
10576 lodash.isFunction(lodash.bar);
10579 // Use `context` to stub `Date#getTime` use in `_.now`.
10580 var stubbed = _.runInContext({
10581 'Date': function() {
10582 return { 'getTime': stubGetTime };
10586 // Create a suped-up `defer` in Node.js.
10587 var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
10595 ### <a id="_stubarray"></a>`_.stubArray()`
10596 <a href="#_stubarray">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15304 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.stubarray "See the npm package")
10598 A method that returns a new empty array.
10603 *(Array)*: Returns the new empty array.
10607 var arrays = _.times(2, _.stubArray);
10609 console.log(arrays);
10612 console.log(arrays[0] === arrays[1]);
10621 ### <a id="_stubfalse"></a>`_.stubFalse()`
10622 <a href="#_stubfalse">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15321 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.stubfalse "See the npm package")
10624 A method that returns `false`.
10629 *(boolean)*: Returns `false`.
10633 _.times(2, _.stubFalse);
10634 // => [false, false]
10642 ### <a id="_stubobject"></a>`_.stubObject()`
10643 <a href="#_stubobject">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15343 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.stubobject "See the npm package")
10645 A method that returns a new empty object.
10650 *(Object)*: Returns the new empty object.
10654 var objects = _.times(2, _.stubObject);
10656 console.log(objects);
10659 console.log(objects[0] === objects[1]);
10668 ### <a id="_stubstring"></a>`_.stubString()`
10669 <a href="#_stubstring">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15360 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.stubstring "See the npm package")
10671 A method that returns an empty string.
10676 *(string)*: Returns the empty string.
10680 _.times(2, _.stubString);
10689 ### <a id="_stubtrue"></a>`_.stubTrue()`
10690 <a href="#_stubtrue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15377 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.stubtrue "See the npm package")
10692 A method that returns `true`.
10697 *(boolean)*: Returns `true`.
10701 _.times(2, _.stubTrue);
10710 ### <a id="_timesn-iteratee_identity"></a>`_.times(n, [iteratee=_.identity])`
10711 <a href="#_timesn-iteratee_identity">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15400 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.times "See the npm package")
10713 Invokes the iteratee `n` times, returning an array of the results of
10714 each invocation. The iteratee is invoked with one argument; *(index)*.
10719 1. `n` *(number)*: The number of times to invoke `iteratee`.
10720 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
10723 *(Array)*: Returns the array of results.
10727 _.times(3, String);
10728 // => ['0', '1', '2']
10730 _.times(4, _.constant(0));
10739 ### <a id="_topathvalue"></a>`_.toPath(value)`
10740 <a href="#_topathvalue">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15435 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.topath "See the npm package")
10742 Converts `value` to a property path array.
10747 1. `value` *(*)*: The value to convert.
10750 *(Array)*: Returns the new property path array.
10755 // => ['a', 'b', 'c']
10757 _.toPath('a[0].b.c');
10758 // => ['a', '0', 'b', 'c']
10766 ### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix=''])`
10767 <a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15459 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.uniqueid "See the npm package")
10769 Generates a unique ID. If `prefix` is given, the ID is appended to it.
10774 1. `[prefix='']` *(string)*: The value to prefix the ID with.
10777 *(string)*: Returns the unique ID.
10781 _.uniqueId('contact_');
10782 // => 'contact_104'
10799 ### <a id="_version"></a>`_.VERSION`
10800 <a href="#_version">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L16152 "View in source") [Ⓣ][1]
10802 (string): The semantic version number.
10810 ### <a id="_templatesettings"></a>`_.templateSettings`
10811 <a href="#_templatesettings">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1509 "View in source") [Ⓣ][1] [Ⓝ](https://www.npmjs.com/package/lodash.templatesettings "See the npm package")
10813 (Object): By default, the template delimiters used by lodash are like those in
10814 embedded Ruby *(ERB)*. Change the following template settings to use
10815 alternative delimiters.
10823 ### <a id="_templatesettingsescape"></a>`_.templateSettings.escape`
10824 <a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1517 "View in source") [Ⓣ][1]
10826 (RegExp): Used to detect `data` property values to be HTML-escaped.
10834 ### <a id="_templatesettingsevaluate"></a>`_.templateSettings.evaluate`
10835 <a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1525 "View in source") [Ⓣ][1]
10837 (RegExp): Used to detect code to be evaluated.
10845 ### <a id="_templatesettingsimports"></a>`_.templateSettings.imports`
10846 <a href="#_templatesettingsimports">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1549 "View in source") [Ⓣ][1]
10848 (Object): Used to import variables into the compiled template.
10856 ### <a id="_templatesettingsinterpolate"></a>`_.templateSettings.interpolate`
10857 <a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1533 "View in source") [Ⓣ][1]
10859 (RegExp): Used to detect `data` property values to inject.
10867 ### <a id="_templatesettingsvariable"></a>`_.templateSettings.variable`
10868 <a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1541 "View in source") [Ⓣ][1]
10870 (string): Used to reference the data object in the template text.
10884 ### <a id="_templatesettingsimports_"></a>`_.templateSettings.imports._`
10885 <a href="#_templatesettingsimports_">#</a> [Ⓢ](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1557 "View in source") [Ⓣ][1]
10887 A reference to the `lodash` function.
10897 [1]: #array "Jump back to the TOC."