nexus site path corrected
[portal.git] / ecomp-portal-FE / client / bower_components / lodash / doc / README.md
1 # <a href="https://lodash.com/">lodash</a> <span>v4.13.1</span>
2
3 <!-- div class="toc-container" -->
4
5 <!-- div -->
6
7 ## `Array`
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>
73
74 <!-- /div -->
75
76 <!-- div -->
77
78 ## `Collection`
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>
107
108 <!-- /div -->
109
110 <!-- div -->
111
112 ## `Date`
113 * <a href="#_now">`_.now`</a>
114
115 <!-- /div -->
116
117 <!-- div -->
118
119 ## `Function`
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>
143
144 <!-- /div -->
145
146 <!-- div -->
147
148 ## `Lang`
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>
204
205 <!-- /div -->
206
207 <!-- div -->
208
209 ## `Math`
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>
225
226 <!-- /div -->
227
228 <!-- div -->
229
230 ## `Number`
231 * <a href="#_clampnumber-lower-upper">`_.clamp`</a>
232 * <a href="#_inrangenumber-start0-end">`_.inRange`</a>
233 * <a href="#_randomlower0-upper1-floating">`_.random`</a>
234
235 <!-- /div -->
236
237 <!-- div -->
238
239 ## `Object`
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>
287
288 <!-- /div -->
289
290 <!-- div -->
291
292 ## `Seq`
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>
307
308 <!-- /div -->
309
310 <!-- div -->
311
312 ## `String`
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>
343
344 <!-- /div -->
345
346 <!-- div -->
347
348 ## `Util`
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>
382
383 <!-- /div -->
384
385 <!-- div -->
386
387 ## `Properties`
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>
395
396 <!-- /div -->
397
398 <!-- div -->
399
400 ## `Methods`
401 * <a href="#_templatesettingsimports_">`_.templateSettings.imports._`</a>
402
403 <!-- /div -->
404
405 <!-- /div -->
406
407 <!-- div class="doc-container" -->
408
409 <!-- div -->
410
411 ## `“Array” Methods`
412
413 <!-- div -->
414
415 ### <a id="_chunkarray-size1"></a>`_.chunk(array, [size=1])`
416 <a href="#_chunkarray-size1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6118 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.chunk "See the npm package")
417
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
420 elements.
421
422 #### Since
423 3.0.0
424 #### Arguments
425 1. `array` *(Array)*: The array to process.
426 2. `[size=1]` *(number)*: The length of each chunk
427
428 #### Returns
429 *(Array)*: Returns the new array of chunks.
430
431 #### Example
432 ```js
433 _.chunk(['a', 'b', 'c', 'd'], 2);
434 // => [['a', 'b'], ['c', 'd']]
435
436 _.chunk(['a', 'b', 'c', 'd'], 3);
437 // => [['a', 'b', 'c'], ['d']]
438 ```
439 * * *
440
441 <!-- /div -->
442
443 <!-- div -->
444
445 ### <a id="_compactarray"></a>`_.compact(array)`
446 <a href="#_compactarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6153 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.compact "See the npm package")
447
448 Creates an array with all falsey values removed. The values `false`, `null`,
449 `0`, `""`, `undefined`, and `NaN` are falsey.
450
451 #### Since
452 0.1.0
453 #### Arguments
454 1. `array` *(Array)*: The array to compact.
455
456 #### Returns
457 *(Array)*: Returns the new array of filtered values.
458
459 #### Example
460 ```js
461 _.compact([0, 1, false, 2, '', 3]);
462 // => [1, 2, 3]
463 ```
464 * * *
465
466 <!-- /div -->
467
468 <!-- div -->
469
470 ### <a id="_concatarray-values"></a>`_.concat(array, [values])`
471 <a href="#_concatarray-values">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6190 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.concat "See the npm package")
472
473 Creates a new array concatenating `array` with any additional arrays
474 and/or values.
475
476 #### Since
477 4.0.0
478 #### Arguments
479 1. `array` *(Array)*: The array to concatenate.
480 2. `[values]` *(...&#42;)*: The values to concatenate.
481
482 #### Returns
483 *(Array)*: Returns the new concatenated array.
484
485 #### Example
486 ```js
487 var array = [1];
488 var other = _.concat(array, 2, [3], [[4]]);
489
490 console.log(other);
491 // => [1, 2, 3, [4]]
492
493 console.log(array);
494 // => [1]
495 ```
496 * * *
497
498 <!-- /div -->
499
500 <!-- div -->
501
502 ### <a id="_differencearray-values"></a>`_.difference(array, [values])`
503 <a href="#_differencearray-values">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6223 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.difference "See the npm package")
504
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.
509
510 #### Since
511 0.1.0
512 #### Arguments
513 1. `array` *(Array)*: The array to inspect.
514 2. `[values]` *(...Array)*: The values to exclude.
515
516 #### Returns
517 *(Array)*: Returns the new array of filtered values.
518
519 #### Example
520 ```js
521 _.difference([2, 1], [2, 3]);
522 // => [1]
523 ```
524 * * *
525
526 <!-- /div -->
527
528 <!-- div -->
529
530 ### <a id="_differencebyarray-values-iteratee_identity"></a>`_.differenceBy(array, [values], [iteratee=_.identity])`
531 <a href="#_differencebyarray-values-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6253 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.differenceby "See the npm package")
532
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)*.
537
538 #### Since
539 4.0.0
540 #### Arguments
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.
544
545 #### Returns
546 *(Array)*: Returns the new array of filtered values.
547
548 #### Example
549 ```js
550 _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
551 // => [1.2]
552
553 // The `_.property` iteratee shorthand.
554 _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
555 // => [{ 'x': 2 }]
556 ```
557 * * *
558
559 <!-- /div -->
560
561 <!-- div -->
562
563 ### <a id="_differencewitharray-values-comparator"></a>`_.differenceWith(array, [values], [comparator])`
564 <a href="#_differencewitharray-values-comparator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6284 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.differencewith "See the npm package")
565
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>
569 *(arrVal, othVal)*.
570
571 #### Since
572 4.0.0
573 #### Arguments
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.
577
578 #### Returns
579 *(Array)*: Returns the new array of filtered values.
580
581 #### Example
582 ```js
583 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
584
585 _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
586 // => [{ 'x': 2, 'y': 1 }]
587 ```
588 * * *
589
590 <!-- /div -->
591
592 <!-- div -->
593
594 ### <a id="_droparray-n1"></a>`_.drop(array, [n=1])`
595 <a href="#_droparray-n1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6319 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.drop "See the npm package")
596
597 Creates a slice of `array` with `n` elements dropped from the beginning.
598
599 #### Since
600 0.5.0
601 #### Arguments
602 1. `array` *(Array)*: The array to query.
603 2. `[n=1]` *(number)*: The number of elements to drop.
604
605 #### Returns
606 *(Array)*: Returns the slice of `array`.
607
608 #### Example
609 ```js
610 _.drop([1, 2, 3]);
611 // => [2, 3]
612
613 _.drop([1, 2, 3], 2);
614 // => [3]
615
616 _.drop([1, 2, 3], 5);
617 // => []
618
619 _.drop([1, 2, 3], 0);
620 // => [1, 2, 3]
621 ```
622 * * *
623
624 <!-- /div -->
625
626 <!-- div -->
627
628 ### <a id="_droprightarray-n1"></a>`_.dropRight(array, [n=1])`
629 <a href="#_droprightarray-n1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6353 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.dropright "See the npm package")
630
631 Creates a slice of `array` with `n` elements dropped from the end.
632
633 #### Since
634 3.0.0
635 #### Arguments
636 1. `array` *(Array)*: The array to query.
637 2. `[n=1]` *(number)*: The number of elements to drop.
638
639 #### Returns
640 *(Array)*: Returns the slice of `array`.
641
642 #### Example
643 ```js
644 _.dropRight([1, 2, 3]);
645 // => [1, 2]
646
647 _.dropRight([1, 2, 3], 2);
648 // => [1]
649
650 _.dropRight([1, 2, 3], 5);
651 // => []
652
653 _.dropRight([1, 2, 3], 0);
654 // => [1, 2, 3]
655 ```
656 * * *
657
658 <!-- /div -->
659
660 <!-- div -->
661
662 ### <a id="_droprightwhilearray-predicate_identity"></a>`_.dropRightWhile(array, [predicate=_.identity])`
663 <a href="#_droprightwhilearray-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6399 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.droprightwhile "See the npm package")
664
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)*.
668
669 #### Since
670 3.0.0
671 #### Arguments
672 1. `array` *(Array)*: The array to query.
673 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
674
675 #### Returns
676 *(Array)*: Returns the slice of `array`.
677
678 #### Example
679 ```js
680 var users = [
681   { 'user': 'barney',  'active': true },
682   { 'user': 'fred',    'active': false },
683   { 'user': 'pebbles', 'active': false }
684 ];
685
686 _.dropRightWhile(users, function(o) { return !o.active; });
687 // => objects for ['barney']
688
689 // The `_.matches` iteratee shorthand.
690 _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
691 // => objects for ['barney', 'fred']
692
693 // The `_.matchesProperty` iteratee shorthand.
694 _.dropRightWhile(users, ['active', false]);
695 // => objects for ['barney']
696
697 // The `_.property` iteratee shorthand.
698 _.dropRightWhile(users, 'active');
699 // => objects for ['barney', 'fred', 'pebbles']
700 ```
701 * * *
702
703 <!-- /div -->
704
705 <!-- div -->
706
707 ### <a id="_dropwhilearray-predicate_identity"></a>`_.dropWhile(array, [predicate=_.identity])`
708 <a href="#_dropwhilearray-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6441 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.dropwhile "See the npm package")
709
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)*.
713
714 #### Since
715 3.0.0
716 #### Arguments
717 1. `array` *(Array)*: The array to query.
718 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
719
720 #### Returns
721 *(Array)*: Returns the slice of `array`.
722
723 #### Example
724 ```js
725 var users = [
726   { 'user': 'barney',  'active': false },
727   { 'user': 'fred',    'active': false },
728   { 'user': 'pebbles', 'active': true }
729 ];
730
731 _.dropWhile(users, function(o) { return !o.active; });
732 // => objects for ['pebbles']
733
734 // The `_.matches` iteratee shorthand.
735 _.dropWhile(users, { 'user': 'barney', 'active': false });
736 // => objects for ['fred', 'pebbles']
737
738 // The `_.matchesProperty` iteratee shorthand.
739 _.dropWhile(users, ['active', false]);
740 // => objects for ['pebbles']
741
742 // The `_.property` iteratee shorthand.
743 _.dropWhile(users, 'active');
744 // => objects for ['barney', 'fred', 'pebbles']
745 ```
746 * * *
747
748 <!-- /div -->
749
750 <!-- div -->
751
752 ### <a id="_fillarray-value-start0-endarraylength"></a>`_.fill(array, value, [start=0], [end=array.length])`
753 <a href="#_fillarray-value-start0-endarraylength">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6476 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.fill "See the npm package")
754
755 Fills elements of `array` with `value` from `start` up to, but not
756 including, `end`.
757 <br>
758 <br>
759 **Note:** This method mutates `array`.
760
761 #### Since
762 3.2.0
763 #### Arguments
764 1. `array` *(Array)*: The array to fill.
765 2. `value` *(&#42;)*: The value to fill `array` with.
766 3. `[start=0]` *(number)*: The start position.
767 4. `[end=array.length]` *(number)*: The end position.
768
769 #### Returns
770 *(Array)*: Returns `array`.
771
772 #### Example
773 ```js
774 var array = [1, 2, 3];
775
776 _.fill(array, 'a');
777 console.log(array);
778 // => ['a', 'a', 'a']
779
780 _.fill(Array(3), 2);
781 // => [2, 2, 2]
782
783 _.fill([4, 6, 8, 10], '*', 1, 3);
784 // => [4, '*', '*', 10]
785 ```
786 * * *
787
788 <!-- /div -->
789
790 <!-- div -->
791
792 ### <a id="_findindexarray-predicate_identity-fromindex0"></a>`_.findIndex(array, [predicate=_.identity], [fromIndex=0])`
793 <a href="#_findindexarray-predicate_identity-fromindex0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6524 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.findindex "See the npm package")
794
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.
797
798 #### Since
799 1.1.0
800 #### Arguments
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.
804
805 #### Returns
806 *(number)*: Returns the index of the found element, else `-1`.
807
808 #### Example
809 ```js
810 var users = [
811   { 'user': 'barney',  'active': false },
812   { 'user': 'fred',    'active': false },
813   { 'user': 'pebbles', 'active': true }
814 ];
815
816 _.findIndex(users, function(o) { return o.user == 'barney'; });
817 // => 0
818
819 // The `_.matches` iteratee shorthand.
820 _.findIndex(users, { 'user': 'fred', 'active': false });
821 // => 1
822
823 // The `_.matchesProperty` iteratee shorthand.
824 _.findIndex(users, ['active', false]);
825 // => 0
826
827 // The `_.property` iteratee shorthand.
828 _.findIndex(users, 'active');
829 // => 2
830 ```
831 * * *
832
833 <!-- /div -->
834
835 <!-- div -->
836
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> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6572 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.findlastindex "See the npm package")
839
840 This method is like `_.findIndex` except that it iterates over elements
841 of `collection` from right to left.
842
843 #### Since
844 2.0.0
845 #### Arguments
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.
849
850 #### Returns
851 *(number)*: Returns the index of the found element, else `-1`.
852
853 #### Example
854 ```js
855 var users = [
856   { 'user': 'barney',  'active': true },
857   { 'user': 'fred',    'active': false },
858   { 'user': 'pebbles', 'active': false }
859 ];
860
861 _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
862 // => 2
863
864 // The `_.matches` iteratee shorthand.
865 _.findLastIndex(users, { 'user': 'barney', 'active': true });
866 // => 0
867
868 // The `_.matchesProperty` iteratee shorthand.
869 _.findLastIndex(users, ['active', false]);
870 // => 2
871
872 // The `_.property` iteratee shorthand.
873 _.findLastIndex(users, 'active');
874 // => 0
875 ```
876 * * *
877
878 <!-- /div -->
879
880 <!-- div -->
881
882 ### <a id="_flattenarray"></a>`_.flatten(array)`
883 <a href="#_flattenarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6601 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.flatten "See the npm package")
884
885 Flattens `array` a single level deep.
886
887 #### Since
888 0.1.0
889 #### Arguments
890 1. `array` *(Array)*: The array to flatten.
891
892 #### Returns
893 *(Array)*: Returns the new flattened array.
894
895 #### Example
896 ```js
897 _.flatten([1, [2, [3, [4]], 5]]);
898 // => [1, 2, [3, [4]], 5]
899 ```
900 * * *
901
902 <!-- /div -->
903
904 <!-- div -->
905
906 ### <a id="_flattendeeparray"></a>`_.flattenDeep(array)`
907 <a href="#_flattendeeparray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6620 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.flattendeep "See the npm package")
908
909 Recursively flattens `array`.
910
911 #### Since
912 3.0.0
913 #### Arguments
914 1. `array` *(Array)*: The array to flatten.
915
916 #### Returns
917 *(Array)*: Returns the new flattened array.
918
919 #### Example
920 ```js
921 _.flattenDeep([1, [2, [3, [4]], 5]]);
922 // => [1, 2, 3, 4, 5]
923 ```
924 * * *
925
926 <!-- /div -->
927
928 <!-- div -->
929
930 ### <a id="_flattendeptharray-depth1"></a>`_.flattenDepth(array, [depth=1])`
931 <a href="#_flattendeptharray-depth1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6645 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.flattendepth "See the npm package")
932
933 Recursively flatten `array` up to `depth` times.
934
935 #### Since
936 4.4.0
937 #### Arguments
938 1. `array` *(Array)*: The array to flatten.
939 2. `[depth=1]` *(number)*: The maximum recursion depth.
940
941 #### Returns
942 *(Array)*: Returns the new flattened array.
943
944 #### Example
945 ```js
946 var array = [1, [2, [3, [4]], 5]];
947
948 _.flattenDepth(array, 1);
949 // => [1, 2, [3, [4]], 5]
950
951 _.flattenDepth(array, 2);
952 // => [1, 2, 3, [4], 5]
953 ```
954 * * *
955
956 <!-- /div -->
957
958 <!-- div -->
959
960 ### <a id="_frompairspairs"></a>`_.fromPairs(pairs)`
961 <a href="#_frompairspairs">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6669 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.frompairs "See the npm package")
962
963 The inverse of `_.toPairs`; this method returns an object composed
964 from key-value `pairs`.
965
966 #### Since
967 4.0.0
968 #### Arguments
969 1. `pairs` *(Array)*: The key-value pairs.
970
971 #### Returns
972 *(Object)*: Returns the new object.
973
974 #### Example
975 ```js
976 _.fromPairs([['fred', 30], ['barney', 40]]);
977 // => { 'fred': 30, 'barney': 40 }
978 ```
979 * * *
980
981 <!-- /div -->
982
983 <!-- div -->
984
985 ### <a id="_headarray"></a>`_.head(array)`
986 <a href="#_headarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6699 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.head "See the npm package")
987
988 Gets the first element of `array`.
989
990 #### Since
991 0.1.0
992 #### Aliases
993 *_.first*
994
995 #### Arguments
996 1. `array` *(Array)*: The array to query.
997
998 #### Returns
999 *(&#42;)*: Returns the first element of `array`.
1000
1001 #### Example
1002 ```js
1003 _.head([1, 2, 3]);
1004 // => 1
1005
1006 _.head([]);
1007 // => undefined
1008 ```
1009 * * *
1010
1011 <!-- /div -->
1012
1013 <!-- div -->
1014
1015 ### <a id="_indexofarray-value-fromindex0"></a>`_.indexOf(array, value, [fromIndex=0])`
1016 <a href="#_indexofarray-value-fromindex0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6726 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.indexof "See the npm package")
1017
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`.
1022
1023 #### Since
1024 0.1.0
1025 #### Arguments
1026 1. `array` *(Array)*: The array to search.
1027 2. `value` *(&#42;)*: The value to search for.
1028 3. `[fromIndex=0]` *(number)*: The index to search from.
1029
1030 #### Returns
1031 *(number)*: Returns the index of the matched value, else `-1`.
1032
1033 #### Example
1034 ```js
1035 _.indexOf([1, 2, 1, 2], 2);
1036 // => 1
1037
1038 // Search from the `fromIndex`.
1039 _.indexOf([1, 2, 1, 2], 2, 2);
1040 // => 3
1041 ```
1042 * * *
1043
1044 <!-- /div -->
1045
1046 <!-- div -->
1047
1048 ### <a id="_initialarray"></a>`_.initial(array)`
1049 <a href="#_initialarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6752 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.initial "See the npm package")
1050
1051 Gets all but the last element of `array`.
1052
1053 #### Since
1054 0.1.0
1055 #### Arguments
1056 1. `array` *(Array)*: The array to query.
1057
1058 #### Returns
1059 *(Array)*: Returns the slice of `array`.
1060
1061 #### Example
1062 ```js
1063 _.initial([1, 2, 3]);
1064 // => [1, 2]
1065 ```
1066 * * *
1067
1068 <!-- /div -->
1069
1070 <!-- div -->
1071
1072 ### <a id="_intersectionarrays"></a>`_.intersection([arrays])`
1073 <a href="#_intersectionarrays">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6773 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.intersection "See the npm package")
1074
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.
1079
1080 #### Since
1081 0.1.0
1082 #### Arguments
1083 1. `[arrays]` *(...Array)*: The arrays to inspect.
1084
1085 #### Returns
1086 *(Array)*: Returns the new array of intersecting values.
1087
1088 #### Example
1089 ```js
1090 _.intersection([2, 1], [2, 3]);
1091 // => [2]
1092 ```
1093 * * *
1094
1095 <!-- /div -->
1096
1097 <!-- div -->
1098
1099 ### <a id="_intersectionbyarrays-iteratee_identity"></a>`_.intersectionBy([arrays], [iteratee=_.identity])`
1100 <a href="#_intersectionbyarrays-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6803 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.intersectionby "See the npm package")
1101
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)*.
1106
1107 #### Since
1108 4.0.0
1109 #### Arguments
1110 1. `[arrays]` *(...Array)*: The arrays to inspect.
1111 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
1112
1113 #### Returns
1114 *(Array)*: Returns the new array of intersecting values.
1115
1116 #### Example
1117 ```js
1118 _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
1119 // => [2.1]
1120
1121 // The `_.property` iteratee shorthand.
1122 _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
1123 // => [{ 'x': 1 }]
1124 ```
1125 * * *
1126
1127 <!-- /div -->
1128
1129 <!-- div -->
1130
1131 ### <a id="_intersectionwitharrays-comparator"></a>`_.intersectionWith([arrays], [comparator])`
1132 <a href="#_intersectionwitharrays-comparator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6838 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.intersectionwith "See the npm package")
1133
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>
1137 *(arrVal, othVal)*.
1138
1139 #### Since
1140 4.0.0
1141 #### Arguments
1142 1. `[arrays]` *(...Array)*: The arrays to inspect.
1143 2. `[comparator]` *(Function)*: The comparator invoked per element.
1144
1145 #### Returns
1146 *(Array)*: Returns the new array of intersecting values.
1147
1148 #### Example
1149 ```js
1150 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
1151 var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
1152
1153 _.intersectionWith(objects, others, _.isEqual);
1154 // => [{ 'x': 1, 'y': 2 }]
1155 ```
1156 * * *
1157
1158 <!-- /div -->
1159
1160 <!-- div -->
1161
1162 ### <a id="_joinarray-separator-"></a>`_.join(array, [separator=','])`
1163 <a href="#_joinarray-separator-">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6867 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.join "See the npm package")
1164
1165 Converts all elements in `array` into a string separated by `separator`.
1166
1167 #### Since
1168 4.0.0
1169 #### Arguments
1170 1. `array` *(Array)*: The array to convert.
1171 2. `[separator=',']` *(string)*: The element separator.
1172
1173 #### Returns
1174 *(string)*: Returns the joined string.
1175
1176 #### Example
1177 ```js
1178 _.join(['a', 'b', 'c'], '~');
1179 // => 'a~b~c'
1180 ```
1181 * * *
1182
1183 <!-- /div -->
1184
1185 <!-- div -->
1186
1187 ### <a id="_lastarray"></a>`_.last(array)`
1188 <a href="#_lastarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6885 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.last "See the npm package")
1189
1190 Gets the last element of `array`.
1191
1192 #### Since
1193 0.1.0
1194 #### Arguments
1195 1. `array` *(Array)*: The array to query.
1196
1197 #### Returns
1198 *(&#42;)*: Returns the last element of `array`.
1199
1200 #### Example
1201 ```js
1202 _.last([1, 2, 3]);
1203 // => 3
1204 ```
1205 * * *
1206
1207 <!-- /div -->
1208
1209 <!-- div -->
1210
1211 ### <a id="_lastindexofarray-value-fromindexarraylength-1"></a>`_.lastIndexOf(array, value, [fromIndex=array.length-1])`
1212 <a href="#_lastindexofarray-value-fromindexarraylength-1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6911 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.lastindexof "See the npm package")
1213
1214 This method is like `_.indexOf` except that it iterates over elements of
1215 `array` from right to left.
1216
1217 #### Since
1218 0.1.0
1219 #### Arguments
1220 1. `array` *(Array)*: The array to search.
1221 2. `value` *(&#42;)*: The value to search for.
1222 3. `[fromIndex=array.length-1]` *(number)*: The index to search from.
1223
1224 #### Returns
1225 *(number)*: Returns the index of the matched value, else `-1`.
1226
1227 #### Example
1228 ```js
1229 _.lastIndexOf([1, 2, 1, 2], 2);
1230 // => 3
1231
1232 // Search from the `fromIndex`.
1233 _.lastIndexOf([1, 2, 1, 2], 2, 2);
1234 // => 1
1235 ```
1236 * * *
1237
1238 <!-- /div -->
1239
1240 <!-- div -->
1241
1242 ### <a id="_ntharray-n0"></a>`_.nth(array, [n=0])`
1243 <a href="#_ntharray-n0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6957 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.nth "See the npm package")
1244
1245 Gets the element at index `n` of `array`. If `n` is negative, the nth
1246 element from the end is returned.
1247
1248 #### Since
1249 4.11.0
1250 #### Arguments
1251 1. `array` *(Array)*: The array to query.
1252 2. `[n=0]` *(number)*: The index of the element to return.
1253
1254 #### Returns
1255 *(&#42;)*: Returns the nth element of `array`.
1256
1257 #### Example
1258 ```js
1259 var array = ['a', 'b', 'c', 'd'];
1260
1261 _.nth(array, 1);
1262 // => 'b'
1263
1264 _.nth(array, -2);
1265 // => 'c';
1266 ```
1267 * * *
1268
1269 <!-- /div -->
1270
1271 <!-- div -->
1272
1273 ### <a id="_pullarray-values"></a>`_.pull(array, [values])`
1274 <a href="#_pullarray-values">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L6984 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.pull "See the npm package")
1275
1276 Removes all given values from `array` using
1277 [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
1278 for equality comparisons.
1279 <br>
1280 <br>
1281 **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
1282 to remove elements from an array by predicate.
1283
1284 #### Since
1285 2.0.0
1286 #### Arguments
1287 1. `array` *(Array)*: The array to modify.
1288 2. `[values]` *(...&#42;)*: The values to remove.
1289
1290 #### Returns
1291 *(Array)*: Returns `array`.
1292
1293 #### Example
1294 ```js
1295 var array = ['a', 'b', 'c', 'a', 'b', 'c'];
1296
1297 _.pull(array, 'a', 'c');
1298 console.log(array);
1299 // => ['b', 'b']
1300 ```
1301 * * *
1302
1303 <!-- /div -->
1304
1305 <!-- div -->
1306
1307 ### <a id="_pullallarray-values"></a>`_.pullAll(array, values)`
1308 <a href="#_pullallarray-values">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7006 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.pullall "See the npm package")
1309
1310 This method is like `_.pull` except that it accepts an array of values to remove.
1311 <br>
1312 <br>
1313 **Note:** Unlike `_.difference`, this method mutates `array`.
1314
1315 #### Since
1316 4.0.0
1317 #### Arguments
1318 1. `array` *(Array)*: The array to modify.
1319 2. `values` *(Array)*: The values to remove.
1320
1321 #### Returns
1322 *(Array)*: Returns `array`.
1323
1324 #### Example
1325 ```js
1326 var array = ['a', 'b', 'c', 'a', 'b', 'c'];
1327
1328 _.pullAll(array, ['a', 'c']);
1329 console.log(array);
1330 // => ['b', 'b']
1331 ```
1332 * * *
1333
1334 <!-- /div -->
1335
1336 <!-- div -->
1337
1338 ### <a id="_pullallbyarray-values-iteratee_identity"></a>`_.pullAllBy(array, values, [iteratee=_.identity])`
1339 <a href="#_pullallbyarray-values-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7036 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.pullallby "See the npm package")
1340
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)*.
1344 <br>
1345 <br>
1346 **Note:** Unlike `_.differenceBy`, this method mutates `array`.
1347
1348 #### Since
1349 4.0.0
1350 #### Arguments
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.
1354
1355 #### Returns
1356 *(Array)*: Returns `array`.
1357
1358 #### Example
1359 ```js
1360 var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
1361
1362 _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
1363 console.log(array);
1364 // => [{ 'x': 2 }]
1365 ```
1366 * * *
1367
1368 <!-- /div -->
1369
1370 <!-- div -->
1371
1372 ### <a id="_pullallwitharray-values-comparator"></a>`_.pullAllWith(array, values, [comparator])`
1373 <a href="#_pullallwitharray-values-comparator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7065 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.pullallwith "See the npm package")
1374
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)*.
1378 <br>
1379 <br>
1380 **Note:** Unlike `_.differenceWith`, this method mutates `array`.
1381
1382 #### Since
1383 4.6.0
1384 #### Arguments
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.
1388
1389 #### Returns
1390 *(Array)*: Returns `array`.
1391
1392 #### Example
1393 ```js
1394 var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
1395
1396 _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
1397 console.log(array);
1398 // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
1399 ```
1400 * * *
1401
1402 <!-- /div -->
1403
1404 <!-- div -->
1405
1406 ### <a id="_pullatarray-indexes"></a>`_.pullAt(array, [indexes])`
1407 <a href="#_pullatarray-indexes">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7095 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.pullat "See the npm package")
1408
1409 Removes elements from `array` corresponding to `indexes` and returns an
1410 array of removed elements.
1411 <br>
1412 <br>
1413 **Note:** Unlike `_.at`, this method mutates `array`.
1414
1415 #### Since
1416 3.0.0
1417 #### Arguments
1418 1. `array` *(Array)*: The array to modify.
1419 2. `[indexes]` *(...(number|number&#91;&#93;))*: The indexes of elements to remove.
1420
1421 #### Returns
1422 *(Array)*: Returns the new array of removed elements.
1423
1424 #### Example
1425 ```js
1426 var array = ['a', 'b', 'c', 'd'];
1427 var pulled = _.pullAt(array, [1, 3]);
1428
1429 console.log(array);
1430 // => ['a', 'c']
1431
1432 console.log(pulled);
1433 // => ['b', 'd']
1434 ```
1435 * * *
1436
1437 <!-- /div -->
1438
1439 <!-- div -->
1440
1441 ### <a id="_removearray-predicate_identity"></a>`_.remove(array, [predicate=_.identity])`
1442 <a href="#_removearray-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7137 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.remove "See the npm package")
1443
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)*.
1447 <br>
1448 <br>
1449 **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
1450 to pull elements from an array by value.
1451
1452 #### Since
1453 2.0.0
1454 #### Arguments
1455 1. `array` *(Array)*: The array to modify.
1456 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
1457
1458 #### Returns
1459 *(Array)*: Returns the new array of removed elements.
1460
1461 #### Example
1462 ```js
1463 var array = [1, 2, 3, 4];
1464 var evens = _.remove(array, function(n) {
1465   return n % 2 == 0;
1466 });
1467
1468 console.log(array);
1469 // => [1, 3]
1470
1471 console.log(evens);
1472 // => [2, 4]
1473 ```
1474 * * *
1475
1476 <!-- /div -->
1477
1478 <!-- div -->
1479
1480 ### <a id="_reversearray"></a>`_.reverse(array)`
1481 <a href="#_reversearray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7181 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.reverse "See the npm package")
1482
1483 Reverses `array` so that the first element becomes the last, the second
1484 element becomes the second to last, and so on.
1485 <br>
1486 <br>
1487 **Note:** This method mutates `array` and is based on
1488 [`Array#reverse`](https://mdn.io/Array/reverse).
1489
1490 #### Since
1491 4.0.0
1492 #### Arguments
1493 1. `array` *(Array)*: The array to modify.
1494
1495 #### Returns
1496 *(Array)*: Returns `array`.
1497
1498 #### Example
1499 ```js
1500 var array = [1, 2, 3];
1501
1502 _.reverse(array);
1503 // => [3, 2, 1]
1504
1505 console.log(array);
1506 // => [3, 2, 1]
1507 ```
1508 * * *
1509
1510 <!-- /div -->
1511
1512 <!-- div -->
1513
1514 ### <a id="_slicearray-start0-endarraylength"></a>`_.slice(array, [start=0], [end=array.length])`
1515 <a href="#_slicearray-start0-endarraylength">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7201 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.slice "See the npm package")
1516
1517 Creates a slice of `array` from `start` up to, but not including, `end`.
1518 <br>
1519 <br>
1520 **Note:** This method is used instead of
1521 [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
1522 returned.
1523
1524 #### Since
1525 3.0.0
1526 #### Arguments
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.
1530
1531 #### Returns
1532 *(Array)*: Returns the slice of `array`.
1533
1534 * * *
1535
1536 <!-- /div -->
1537
1538 <!-- div -->
1539
1540 ### <a id="_sortedindexarray-value"></a>`_.sortedIndex(array, value)`
1541 <a href="#_sortedindexarray-value">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7234 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sortedindex "See the npm package")
1542
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.
1545
1546 #### Since
1547 0.1.0
1548 #### Arguments
1549 1. `array` *(Array)*: The sorted array to inspect.
1550 2. `value` *(&#42;)*: The value to evaluate.
1551
1552 #### Returns
1553 *(number)*: Returns the index at which `value` should be inserted into `array`.
1554
1555 #### Example
1556 ```js
1557 _.sortedIndex([30, 50], 40);
1558 // => 1
1559 ```
1560 * * *
1561
1562 <!-- /div -->
1563
1564 <!-- div -->
1565
1566 ### <a id="_sortedindexbyarray-value-iteratee_identity"></a>`_.sortedIndexBy(array, value, [iteratee=_.identity])`
1567 <a href="#_sortedindexbyarray-value-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7264 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sortedindexby "See the npm package")
1568
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)*.
1572
1573 #### Since
1574 4.0.0
1575 #### Arguments
1576 1. `array` *(Array)*: The sorted array to inspect.
1577 2. `value` *(&#42;)*: The value to evaluate.
1578 3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
1579
1580 #### Returns
1581 *(number)*: Returns the index at which `value` should be inserted into `array`.
1582
1583 #### Example
1584 ```js
1585 var objects = [{ 'x': 4 }, { 'x': 5 }];
1586
1587 _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
1588 // => 0
1589
1590 // The `_.property` iteratee shorthand.
1591 _.sortedIndexBy(objects, { 'x': 4 }, 'x');
1592 // => 0
1593 ```
1594 * * *
1595
1596 <!-- /div -->
1597
1598 <!-- div -->
1599
1600 ### <a id="_sortedindexofarray-value"></a>`_.sortedIndexOf(array, value)`
1601 <a href="#_sortedindexofarray-value">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7284 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sortedindexof "See the npm package")
1602
1603 This method is like `_.indexOf` except that it performs a binary
1604 search on a sorted `array`.
1605
1606 #### Since
1607 4.0.0
1608 #### Arguments
1609 1. `array` *(Array)*: The array to search.
1610 2. `value` *(&#42;)*: The value to search for.
1611
1612 #### Returns
1613 *(number)*: Returns the index of the matched value, else `-1`.
1614
1615 #### Example
1616 ```js
1617 _.sortedIndexOf([4, 5, 5, 5, 6], 5);
1618 // => 1
1619 ```
1620 * * *
1621
1622 <!-- /div -->
1623
1624 <!-- div -->
1625
1626 ### <a id="_sortedlastindexarray-value"></a>`_.sortedLastIndex(array, value)`
1627 <a href="#_sortedlastindexarray-value">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7313 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package")
1628
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.
1632
1633 #### Since
1634 3.0.0
1635 #### Arguments
1636 1. `array` *(Array)*: The sorted array to inspect.
1637 2. `value` *(&#42;)*: The value to evaluate.
1638
1639 #### Returns
1640 *(number)*: Returns the index at which `value` should be inserted into `array`.
1641
1642 #### Example
1643 ```js
1644 _.sortedLastIndex([4, 5, 5, 5, 6], 5);
1645 // => 4
1646 ```
1647 * * *
1648
1649 <!-- /div -->
1650
1651 <!-- div -->
1652
1653 ### <a id="_sortedlastindexbyarray-value-iteratee_identity"></a>`_.sortedLastIndexBy(array, value, [iteratee=_.identity])`
1654 <a href="#_sortedlastindexbyarray-value-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7343 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package")
1655
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)*.
1659
1660 #### Since
1661 4.0.0
1662 #### Arguments
1663 1. `array` *(Array)*: The sorted array to inspect.
1664 2. `value` *(&#42;)*: The value to evaluate.
1665 3. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
1666
1667 #### Returns
1668 *(number)*: Returns the index at which `value` should be inserted into `array`.
1669
1670 #### Example
1671 ```js
1672 var objects = [{ 'x': 4 }, { 'x': 5 }];
1673
1674 _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
1675 // => 1
1676
1677 // The `_.property` iteratee shorthand.
1678 _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
1679 // => 1
1680 ```
1681 * * *
1682
1683 <!-- /div -->
1684
1685 <!-- div -->
1686
1687 ### <a id="_sortedlastindexofarray-value"></a>`_.sortedLastIndexOf(array, value)`
1688 <a href="#_sortedlastindexofarray-value">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7363 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package")
1689
1690 This method is like `_.lastIndexOf` except that it performs a binary
1691 search on a sorted `array`.
1692
1693 #### Since
1694 4.0.0
1695 #### Arguments
1696 1. `array` *(Array)*: The array to search.
1697 2. `value` *(&#42;)*: The value to search for.
1698
1699 #### Returns
1700 *(number)*: Returns the index of the matched value, else `-1`.
1701
1702 #### Example
1703 ```js
1704 _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
1705 // => 3
1706 ```
1707 * * *
1708
1709 <!-- /div -->
1710
1711 <!-- div -->
1712
1713 ### <a id="_sorteduniqarray"></a>`_.sortedUniq(array)`
1714 <a href="#_sorteduniqarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7389 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sorteduniq "See the npm package")
1715
1716 This method is like `_.uniq` except that it's designed and optimized
1717 for sorted arrays.
1718
1719 #### Since
1720 4.0.0
1721 #### Arguments
1722 1. `array` *(Array)*: The array to inspect.
1723
1724 #### Returns
1725 *(Array)*: Returns the new duplicate free array.
1726
1727 #### Example
1728 ```js
1729 _.sortedUniq([1, 1, 2]);
1730 // => [1, 2]
1731 ```
1732 * * *
1733
1734 <!-- /div -->
1735
1736 <!-- div -->
1737
1738 ### <a id="_sorteduniqbyarray-iteratee"></a>`_.sortedUniqBy(array, [iteratee])`
1739 <a href="#_sorteduniqbyarray-iteratee">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7411 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sorteduniqby "See the npm package")
1740
1741 This method is like `_.uniqBy` except that it's designed and optimized
1742 for sorted arrays.
1743
1744 #### Since
1745 4.0.0
1746 #### Arguments
1747 1. `array` *(Array)*: The array to inspect.
1748 2. `[iteratee]` *(Function)*: The iteratee invoked per element.
1749
1750 #### Returns
1751 *(Array)*: Returns the new duplicate free array.
1752
1753 #### Example
1754 ```js
1755 _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
1756 // => [1.1, 2.3]
1757 ```
1758 * * *
1759
1760 <!-- /div -->
1761
1762 <!-- div -->
1763
1764 ### <a id="_tailarray"></a>`_.tail(array)`
1765 <a href="#_tailarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7431 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.tail "See the npm package")
1766
1767 Gets all but the first element of `array`.
1768
1769 #### Since
1770 4.0.0
1771 #### Arguments
1772 1. `array` *(Array)*: The array to query.
1773
1774 #### Returns
1775 *(Array)*: Returns the slice of `array`.
1776
1777 #### Example
1778 ```js
1779 _.tail([1, 2, 3]);
1780 // => [2, 3]
1781 ```
1782 * * *
1783
1784 <!-- /div -->
1785
1786 <!-- div -->
1787
1788 ### <a id="_takearray-n1"></a>`_.take(array, [n=1])`
1789 <a href="#_takearray-n1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7460 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.take "See the npm package")
1790
1791 Creates a slice of `array` with `n` elements taken from the beginning.
1792
1793 #### Since
1794 0.1.0
1795 #### Arguments
1796 1. `array` *(Array)*: The array to query.
1797 2. `[n=1]` *(number)*: The number of elements to take.
1798
1799 #### Returns
1800 *(Array)*: Returns the slice of `array`.
1801
1802 #### Example
1803 ```js
1804 _.take([1, 2, 3]);
1805 // => [1]
1806
1807 _.take([1, 2, 3], 2);
1808 // => [1, 2]
1809
1810 _.take([1, 2, 3], 5);
1811 // => [1, 2, 3]
1812
1813 _.take([1, 2, 3], 0);
1814 // => []
1815 ```
1816 * * *
1817
1818 <!-- /div -->
1819
1820 <!-- div -->
1821
1822 ### <a id="_takerightarray-n1"></a>`_.takeRight(array, [n=1])`
1823 <a href="#_takerightarray-n1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7493 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.takeright "See the npm package")
1824
1825 Creates a slice of `array` with `n` elements taken from the end.
1826
1827 #### Since
1828 3.0.0
1829 #### Arguments
1830 1. `array` *(Array)*: The array to query.
1831 2. `[n=1]` *(number)*: The number of elements to take.
1832
1833 #### Returns
1834 *(Array)*: Returns the slice of `array`.
1835
1836 #### Example
1837 ```js
1838 _.takeRight([1, 2, 3]);
1839 // => [3]
1840
1841 _.takeRight([1, 2, 3], 2);
1842 // => [2, 3]
1843
1844 _.takeRight([1, 2, 3], 5);
1845 // => [1, 2, 3]
1846
1847 _.takeRight([1, 2, 3], 0);
1848 // => []
1849 ```
1850 * * *
1851
1852 <!-- /div -->
1853
1854 <!-- div -->
1855
1856 ### <a id="_takerightwhilearray-predicate_identity"></a>`_.takeRightWhile(array, [predicate=_.identity])`
1857 <a href="#_takerightwhilearray-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7539 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.takerightwhile "See the npm package")
1858
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)*.
1862
1863 #### Since
1864 3.0.0
1865 #### Arguments
1866 1. `array` *(Array)*: The array to query.
1867 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
1868
1869 #### Returns
1870 *(Array)*: Returns the slice of `array`.
1871
1872 #### Example
1873 ```js
1874 var users = [
1875   { 'user': 'barney',  'active': true },
1876   { 'user': 'fred',    'active': false },
1877   { 'user': 'pebbles', 'active': false }
1878 ];
1879
1880 _.takeRightWhile(users, function(o) { return !o.active; });
1881 // => objects for ['fred', 'pebbles']
1882
1883 // The `_.matches` iteratee shorthand.
1884 _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
1885 // => objects for ['pebbles']
1886
1887 // The `_.matchesProperty` iteratee shorthand.
1888 _.takeRightWhile(users, ['active', false]);
1889 // => objects for ['fred', 'pebbles']
1890
1891 // The `_.property` iteratee shorthand.
1892 _.takeRightWhile(users, 'active');
1893 // => []
1894 ```
1895 * * *
1896
1897 <!-- /div -->
1898
1899 <!-- div -->
1900
1901 ### <a id="_takewhilearray-predicate_identity"></a>`_.takeWhile(array, [predicate=_.identity])`
1902 <a href="#_takewhilearray-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7581 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.takewhile "See the npm package")
1903
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)*.
1907
1908 #### Since
1909 3.0.0
1910 #### Arguments
1911 1. `array` *(Array)*: The array to query.
1912 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
1913
1914 #### Returns
1915 *(Array)*: Returns the slice of `array`.
1916
1917 #### Example
1918 ```js
1919 var users = [
1920   { 'user': 'barney',  'active': false },
1921   { 'user': 'fred',    'active': false},
1922   { 'user': 'pebbles', 'active': true }
1923 ];
1924
1925 _.takeWhile(users, function(o) { return !o.active; });
1926 // => objects for ['barney', 'fred']
1927
1928 // The `_.matches` iteratee shorthand.
1929 _.takeWhile(users, { 'user': 'barney', 'active': false });
1930 // => objects for ['barney']
1931
1932 // The `_.matchesProperty` iteratee shorthand.
1933 _.takeWhile(users, ['active', false]);
1934 // => objects for ['barney', 'fred']
1935
1936 // The `_.property` iteratee shorthand.
1937 _.takeWhile(users, 'active');
1938 // => []
1939 ```
1940 * * *
1941
1942 <!-- /div -->
1943
1944 <!-- div -->
1945
1946 ### <a id="_unionarrays"></a>`_.union([arrays])`
1947 <a href="#_unionarrays">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7603 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.union "See the npm package")
1948
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.
1952
1953 #### Since
1954 0.1.0
1955 #### Arguments
1956 1. `[arrays]` *(...Array)*: The arrays to inspect.
1957
1958 #### Returns
1959 *(Array)*: Returns the new array of combined values.
1960
1961 #### Example
1962 ```js
1963 _.union([2], [1, 2]);
1964 // => [2, 1]
1965 ```
1966 * * *
1967
1968 <!-- /div -->
1969
1970 <!-- div -->
1971
1972 ### <a id="_unionbyarrays-iteratee_identity"></a>`_.unionBy([arrays], [iteratee=_.identity])`
1973 <a href="#_unionbyarrays-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7630 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.unionby "See the npm package")
1974
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>
1978 *(value)*.
1979
1980 #### Since
1981 4.0.0
1982 #### Arguments
1983 1. `[arrays]` *(...Array)*: The arrays to inspect.
1984 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
1985
1986 #### Returns
1987 *(Array)*: Returns the new array of combined values.
1988
1989 #### Example
1990 ```js
1991 _.unionBy([2.1], [1.2, 2.3], Math.floor);
1992 // => [2.1, 1.2]
1993
1994 // The `_.property` iteratee shorthand.
1995 _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
1996 // => [{ 'x': 1 }, { 'x': 2 }]
1997 ```
1998 * * *
1999
2000 <!-- /div -->
2001
2002 <!-- div -->
2003
2004 ### <a id="_unionwitharrays-comparator"></a>`_.unionWith([arrays], [comparator])`
2005 <a href="#_unionwitharrays-comparator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7658 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.unionwith "See the npm package")
2006
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)*.
2010
2011 #### Since
2012 4.0.0
2013 #### Arguments
2014 1. `[arrays]` *(...Array)*: The arrays to inspect.
2015 2. `[comparator]` *(Function)*: The comparator invoked per element.
2016
2017 #### Returns
2018 *(Array)*: Returns the new array of combined values.
2019
2020 #### Example
2021 ```js
2022 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
2023 var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
2024
2025 _.unionWith(objects, others, _.isEqual);
2026 // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
2027 ```
2028 * * *
2029
2030 <!-- /div -->
2031
2032 <!-- div -->
2033
2034 ### <a id="_uniqarray"></a>`_.uniq(array)`
2035 <a href="#_uniqarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7683 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.uniq "See the npm package")
2036
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
2040 element is kept.
2041
2042 #### Since
2043 0.1.0
2044 #### Arguments
2045 1. `array` *(Array)*: The array to inspect.
2046
2047 #### Returns
2048 *(Array)*: Returns the new duplicate free array.
2049
2050 #### Example
2051 ```js
2052 _.uniq([2, 1, 2]);
2053 // => [2, 1]
2054 ```
2055 * * *
2056
2057 <!-- /div -->
2058
2059 <!-- div -->
2060
2061 ### <a id="_uniqbyarray-iteratee_identity"></a>`_.uniqBy(array, [iteratee=_.identity])`
2062 <a href="#_uniqbyarray-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7711 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.uniqby "See the npm package")
2063
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)*.
2067
2068 #### Since
2069 4.0.0
2070 #### Arguments
2071 1. `array` *(Array)*: The array to inspect.
2072 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
2073
2074 #### Returns
2075 *(Array)*: Returns the new duplicate free array.
2076
2077 #### Example
2078 ```js
2079 _.uniqBy([2.1, 1.2, 2.3], Math.floor);
2080 // => [2.1, 1.2]
2081
2082 // The `_.property` iteratee shorthand.
2083 _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
2084 // => [{ 'x': 1 }, { 'x': 2 }]
2085 ```
2086 * * *
2087
2088 <!-- /div -->
2089
2090 <!-- div -->
2091
2092 ### <a id="_uniqwitharray-comparator"></a>`_.uniqWith(array, [comparator])`
2093 <a href="#_uniqwitharray-comparator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7736 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.uniqwith "See the npm package")
2094
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)*.
2098
2099 #### Since
2100 4.0.0
2101 #### Arguments
2102 1. `array` *(Array)*: The array to inspect.
2103 2. `[comparator]` *(Function)*: The comparator invoked per element.
2104
2105 #### Returns
2106 *(Array)*: Returns the new duplicate free array.
2107
2108 #### Example
2109 ```js
2110 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
2111
2112 _.uniqWith(objects, _.isEqual);
2113 // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
2114 ```
2115 * * *
2116
2117 <!-- /div -->
2118
2119 <!-- div -->
2120
2121 ### <a id="_unziparray"></a>`_.unzip(array)`
2122 <a href="#_unziparray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7761 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.unzip "See the npm package")
2123
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
2126 configuration.
2127
2128 #### Since
2129 1.2.0
2130 #### Arguments
2131 1. `array` *(Array)*: The array of grouped elements to process.
2132
2133 #### Returns
2134 *(Array)*: Returns the new array of regrouped elements.
2135
2136 #### Example
2137 ```js
2138 var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
2139 // => [['fred', 30, true], ['barney', 40, false]]
2140
2141 _.unzip(zipped);
2142 // => [['fred', 'barney'], [30, 40], [true, false]]
2143 ```
2144 * * *
2145
2146 <!-- /div -->
2147
2148 <!-- div -->
2149
2150 ### <a id="_unzipwitharray-iteratee_identity"></a>`_.unzipWith(array, [iteratee=_.identity])`
2151 <a href="#_unzipwitharray-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7798 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.unzipwith "See the npm package")
2152
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)*.
2156
2157 #### Since
2158 3.8.0
2159 #### Arguments
2160 1. `array` *(Array)*: The array of grouped elements to process.
2161 2. `[iteratee=_.identity]` *(Function)*: The function to combine regrouped values.
2162
2163 #### Returns
2164 *(Array)*: Returns the new array of regrouped elements.
2165
2166 #### Example
2167 ```js
2168 var zipped = _.zip([1, 2], [10, 20], [100, 200]);
2169 // => [[1, 10, 100], [2, 20, 200]]
2170
2171 _.unzipWith(zipped, _.add);
2172 // => [3, 30, 300]
2173 ```
2174 * * *
2175
2176 <!-- /div -->
2177
2178 <!-- div -->
2179
2180 ### <a id="_withoutarray-values"></a>`_.without(array, [values])`
2181 <a href="#_withoutarray-values">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7829 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.without "See the npm package")
2182
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.
2186
2187 #### Since
2188 0.1.0
2189 #### Arguments
2190 1. `array` *(Array)*: The array to inspect.
2191 2. `[values]` *(...&#42;)*: The values to exclude.
2192
2193 #### Returns
2194 *(Array)*: Returns the new array of filtered values.
2195
2196 #### Example
2197 ```js
2198 _.without([2, 1, 2, 3], 1, 2);
2199 // => [3]
2200 ```
2201 * * *
2202
2203 <!-- /div -->
2204
2205 <!-- div -->
2206
2207 ### <a id="_xorarrays"></a>`_.xor([arrays])`
2208 <a href="#_xorarrays">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7853 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.xor "See the npm package")
2209
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.
2214
2215 #### Since
2216 2.4.0
2217 #### Arguments
2218 1. `[arrays]` *(...Array)*: The arrays to inspect.
2219
2220 #### Returns
2221 *(Array)*: Returns the new array of filtered values.
2222
2223 #### Example
2224 ```js
2225 _.xor([2, 1], [2, 3]);
2226 // => [1, 3]
2227 ```
2228 * * *
2229
2230 <!-- /div -->
2231
2232 <!-- div -->
2233
2234 ### <a id="_xorbyarrays-iteratee_identity"></a>`_.xorBy([arrays], [iteratee=_.identity])`
2235 <a href="#_xorbyarrays-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7880 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.xorby "See the npm package")
2236
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>
2240 *(value)*.
2241
2242 #### Since
2243 4.0.0
2244 #### Arguments
2245 1. `[arrays]` *(...Array)*: The arrays to inspect.
2246 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
2247
2248 #### Returns
2249 *(Array)*: Returns the new array of filtered values.
2250
2251 #### Example
2252 ```js
2253 _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
2254 // => [1.2, 3.4]
2255
2256 // The `_.property` iteratee shorthand.
2257 _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
2258 // => [{ 'x': 2 }]
2259 ```
2260 * * *
2261
2262 <!-- /div -->
2263
2264 <!-- div -->
2265
2266 ### <a id="_xorwitharrays-comparator"></a>`_.xorWith([arrays], [comparator])`
2267 <a href="#_xorwitharrays-comparator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7908 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.xorwith "See the npm package")
2268
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)*.
2272
2273 #### Since
2274 4.0.0
2275 #### Arguments
2276 1. `[arrays]` *(...Array)*: The arrays to inspect.
2277 2. `[comparator]` *(Function)*: The comparator invoked per element.
2278
2279 #### Returns
2280 *(Array)*: Returns the new array of filtered values.
2281
2282 #### Example
2283 ```js
2284 var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
2285 var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
2286
2287 _.xorWith(objects, others, _.isEqual);
2288 // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
2289 ```
2290 * * *
2291
2292 <!-- /div -->
2293
2294 <!-- div -->
2295
2296 ### <a id="_ziparrays"></a>`_.zip([arrays])`
2297 <a href="#_ziparrays">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7932 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.zip "See the npm package")
2298
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.
2302
2303 #### Since
2304 0.1.0
2305 #### Arguments
2306 1. `[arrays]` *(...Array)*: The arrays to process.
2307
2308 #### Returns
2309 *(Array)*: Returns the new array of grouped elements.
2310
2311 #### Example
2312 ```js
2313 _.zip(['fred', 'barney'], [30, 40], [true, false]);
2314 // => [['fred', 30, true], ['barney', 40, false]]
2315 ```
2316 * * *
2317
2318 <!-- /div -->
2319
2320 <!-- div -->
2321
2322 ### <a id="_zipobjectprops-values"></a>`_.zipObject([props=[]], [values=[]])`
2323 <a href="#_zipobjectprops-values">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7950 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.zipobject "See the npm package")
2324
2325 This method is like `_.fromPairs` except that it accepts two arrays,
2326 one of property identifiers and one of corresponding values.
2327
2328 #### Since
2329 0.4.0
2330 #### Arguments
2331 1. `[props=[]]` *(Array)*: The property identifiers.
2332 2. `[values=[]]` *(Array)*: The property values.
2333
2334 #### Returns
2335 *(Object)*: Returns the new object.
2336
2337 #### Example
2338 ```js
2339 _.zipObject(['a', 'b'], [1, 2]);
2340 // => { 'a': 1, 'b': 2 }
2341 ```
2342 * * *
2343
2344 <!-- /div -->
2345
2346 <!-- div -->
2347
2348 ### <a id="_zipobjectdeepprops-values"></a>`_.zipObjectDeep([props=[]], [values=[]])`
2349 <a href="#_zipobjectdeepprops-values">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7969 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.zipobjectdeep "See the npm package")
2350
2351 This method is like `_.zipObject` except that it supports property paths.
2352
2353 #### Since
2354 4.1.0
2355 #### Arguments
2356 1. `[props=[]]` *(Array)*: The property identifiers.
2357 2. `[values=[]]` *(Array)*: The property values.
2358
2359 #### Returns
2360 *(Object)*: Returns the new object.
2361
2362 #### Example
2363 ```js
2364 _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
2365 // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
2366 ```
2367 * * *
2368
2369 <!-- /div -->
2370
2371 <!-- div -->
2372
2373 ### <a id="_zipwitharrays-iteratee_identity"></a>`_.zipWith([arrays], [iteratee=_.identity])`
2374 <a href="#_zipwitharrays-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L7992 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.zipwith "See the npm package")
2375
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)*.
2379
2380 #### Since
2381 3.8.0
2382 #### Arguments
2383 1. `[arrays]` *(...Array)*: The arrays to process.
2384 2. `[iteratee=_.identity]` *(Function)*: The function to combine grouped values.
2385
2386 #### Returns
2387 *(Array)*: Returns the new array of grouped elements.
2388
2389 #### Example
2390 ```js
2391 _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
2392   return a + b + c;
2393 });
2394 // => [111, 222]
2395 ```
2396 * * *
2397
2398 <!-- /div -->
2399
2400 <!-- /div -->
2401
2402 <!-- div -->
2403
2404 ## `“Collection” Methods`
2405
2406 <!-- div -->
2407
2408 ### <a id="_countbycollection-iteratee_identity"></a>`_.countBy(collection, [iteratee=_.identity])`
2409 <a href="#_countbycollection-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8373 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.countby "See the npm package")
2410
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)*.
2415
2416 #### Since
2417 0.5.0
2418 #### Arguments
2419 1. `collection` *(Array|Object)*: The collection to iterate over.
2420 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee to transform keys.
2421
2422 #### Returns
2423 *(Object)*: Returns the composed aggregate object.
2424
2425 #### Example
2426 ```js
2427 _.countBy([6.1, 4.2, 6.3], Math.floor);
2428 // => { '4': 1, '6': 2 }
2429
2430 // The `_.property` iteratee shorthand.
2431 _.countBy(['one', 'two', 'three'], 'length');
2432 // => { '3': 2, '5': 1 }
2433 ```
2434 * * *
2435
2436 <!-- /div -->
2437
2438 <!-- div -->
2439
2440 ### <a id="_everycollection-predicate_identity"></a>`_.every(collection, [predicate=_.identity])`
2441 <a href="#_everycollection-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8414 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.every "See the npm package")
2442
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)*.
2446
2447 #### Since
2448 0.1.0
2449 #### Arguments
2450 1. `collection` *(Array|Object)*: The collection to iterate over.
2451 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2452
2453 #### Returns
2454 *(boolean)*: Returns `true` if all elements pass the predicate check, else `false`.
2455
2456 #### Example
2457 ```js
2458 _.every([true, 1, null, 'yes'], Boolean);
2459 // => false
2460
2461 var users = [
2462   { 'user': 'barney', 'age': 36, 'active': false },
2463   { 'user': 'fred',   'age': 40, 'active': false }
2464 ];
2465
2466 // The `_.matches` iteratee shorthand.
2467 _.every(users, { 'user': 'barney', 'active': false });
2468 // => false
2469
2470 // The `_.matchesProperty` iteratee shorthand.
2471 _.every(users, ['active', false]);
2472 // => true
2473
2474 // The `_.property` iteratee shorthand.
2475 _.every(users, 'active');
2476 // => false
2477 ```
2478 * * *
2479
2480 <!-- /div -->
2481
2482 <!-- div -->
2483
2484 ### <a id="_filtercollection-predicate_identity"></a>`_.filter(collection, [predicate=_.identity])`
2485 <a href="#_filtercollection-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8458 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.filter "See the npm package")
2486
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)*.
2490
2491 #### Since
2492 0.1.0
2493 #### Arguments
2494 1. `collection` *(Array|Object)*: The collection to iterate over.
2495 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2496
2497 #### Returns
2498 *(Array)*: Returns the new filtered array.
2499
2500 #### Example
2501 ```js
2502 var users = [
2503   { 'user': 'barney', 'age': 36, 'active': true },
2504   { 'user': 'fred',   'age': 40, 'active': false }
2505 ];
2506
2507 _.filter(users, function(o) { return !o.active; });
2508 // => objects for ['fred']
2509
2510 // The `_.matches` iteratee shorthand.
2511 _.filter(users, { 'age': 36, 'active': true });
2512 // => objects for ['barney']
2513
2514 // The `_.matchesProperty` iteratee shorthand.
2515 _.filter(users, ['active', false]);
2516 // => objects for ['fred']
2517
2518 // The `_.property` iteratee shorthand.
2519 _.filter(users, 'active');
2520 // => objects for ['barney']
2521 ```
2522 * * *
2523
2524 <!-- /div -->
2525
2526 <!-- div -->
2527
2528 ### <a id="_findcollection-predicate_identity-fromindex0"></a>`_.find(collection, [predicate=_.identity], [fromIndex=0])`
2529 <a href="#_findcollection-predicate_identity-fromindex0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8500 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.find "See the npm package")
2530
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)*.
2534
2535 #### Since
2536 0.1.0
2537 #### Arguments
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.
2541
2542 #### Returns
2543 *(&#42;)*: Returns the matched element, else `undefined`.
2544
2545 #### Example
2546 ```js
2547 var users = [
2548   { 'user': 'barney',  'age': 36, 'active': true },
2549   { 'user': 'fred',    'age': 40, 'active': false },
2550   { 'user': 'pebbles', 'age': 1,  'active': true }
2551 ];
2552
2553 _.find(users, function(o) { return o.age < 40; });
2554 // => object for 'barney'
2555
2556 // The `_.matches` iteratee shorthand.
2557 _.find(users, { 'age': 1, 'active': true });
2558 // => object for 'pebbles'
2559
2560 // The `_.matchesProperty` iteratee shorthand.
2561 _.find(users, ['active', false]);
2562 // => object for 'fred'
2563
2564 // The `_.property` iteratee shorthand.
2565 _.find(users, 'active');
2566 // => object for 'barney'
2567 ```
2568 * * *
2569
2570 <!-- /div -->
2571
2572 <!-- div -->
2573
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> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8522 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.findlast "See the npm package")
2576
2577 This method is like `_.find` except that it iterates over elements of
2578 `collection` from right to left.
2579
2580 #### Since
2581 2.0.0
2582 #### Arguments
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.
2586
2587 #### Returns
2588 *(&#42;)*: Returns the matched element, else `undefined`.
2589
2590 #### Example
2591 ```js
2592 _.findLast([1, 2, 3, 4], function(n) {
2593   return n % 2 == 1;
2594 });
2595 // => 3
2596 ```
2597 * * *
2598
2599 <!-- /div -->
2600
2601 <!-- div -->
2602
2603 ### <a id="_flatmapcollection-iteratee_identity"></a>`_.flatMap(collection, [iteratee=_.identity])`
2604 <a href="#_flatmapcollection-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8546 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.flatmap "See the npm package")
2605
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)*.
2609
2610 #### Since
2611 4.0.0
2612 #### Arguments
2613 1. `collection` *(Array|Object)*: The collection to iterate over.
2614 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2615
2616 #### Returns
2617 *(Array)*: Returns the new flattened array.
2618
2619 #### Example
2620 ```js
2621 function duplicate(n) {
2622   return [n, n];
2623 }
2624
2625 _.flatMap([1, 2], duplicate);
2626 // => [1, 1, 2, 2]
2627 ```
2628 * * *
2629
2630 <!-- /div -->
2631
2632 <!-- div -->
2633
2634 ### <a id="_flatmapdeepcollection-iteratee_identity"></a>`_.flatMapDeep(collection, [iteratee=_.identity])`
2635 <a href="#_flatmapdeepcollection-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8571 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.flatmapdeep "See the npm package")
2636
2637 This method is like `_.flatMap` except that it recursively flattens the
2638 mapped results.
2639
2640 #### Since
2641 4.7.0
2642 #### Arguments
2643 1. `collection` *(Array|Object)*: The collection to iterate over.
2644 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2645
2646 #### Returns
2647 *(Array)*: Returns the new flattened array.
2648
2649 #### Example
2650 ```js
2651 function duplicate(n) {
2652   return [[[n, n]]];
2653 }
2654
2655 _.flatMapDeep([1, 2], duplicate);
2656 // => [1, 1, 2, 2]
2657 ```
2658 * * *
2659
2660 <!-- /div -->
2661
2662 <!-- div -->
2663
2664 ### <a id="_flatmapdepthcollection-iteratee_identity-depth1"></a>`_.flatMapDepth(collection, [iteratee=_.identity], [depth=1])`
2665 <a href="#_flatmapdepthcollection-iteratee_identity-depth1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8597 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.flatmapdepth "See the npm package")
2666
2667 This method is like `_.flatMap` except that it recursively flattens the
2668 mapped results up to `depth` times.
2669
2670 #### Since
2671 4.7.0
2672 #### Arguments
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.
2676
2677 #### Returns
2678 *(Array)*: Returns the new flattened array.
2679
2680 #### Example
2681 ```js
2682 function duplicate(n) {
2683   return [[[n, n]]];
2684 }
2685
2686 _.flatMapDepth([1, 2], duplicate, 2);
2687 // => [[1, 1], [2, 2]]
2688 ```
2689 * * *
2690
2691 <!-- /div -->
2692
2693 <!-- div -->
2694
2695 ### <a id="_foreachcollection-iteratee_identity"></a>`_.forEach(collection, [iteratee=_.identity])`
2696 <a href="#_foreachcollection-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8632 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.foreach "See the npm package")
2697
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`.
2701 <br>
2702 <br>
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.
2706
2707 #### Since
2708 0.1.0
2709 #### Aliases
2710 *_.each*
2711
2712 #### Arguments
2713 1. `collection` *(Array|Object)*: The collection to iterate over.
2714 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
2715
2716 #### Returns
2717 *(&#42;)*: Returns `collection`.
2718
2719 #### Example
2720 ```js
2721 _([1, 2]).forEach(function(value) {
2722   console.log(value);
2723 });
2724 // => Logs `1` then `2`.
2725
2726 _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
2727   console.log(key);
2728 });
2729 // => Logs 'a' then 'b' (iteration order is not guaranteed).
2730 ```
2731 * * *
2732
2733 <!-- /div -->
2734
2735 <!-- div -->
2736
2737 ### <a id="_foreachrightcollection-iteratee_identity"></a>`_.forEachRight(collection, [iteratee=_.identity])`
2738 <a href="#_foreachrightcollection-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8657 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.foreachright "See the npm package")
2739
2740 This method is like `_.forEach` except that it iterates over elements of
2741 `collection` from right to left.
2742
2743 #### Since
2744 2.0.0
2745 #### Aliases
2746 *_.eachRight*
2747
2748 #### Arguments
2749 1. `collection` *(Array|Object)*: The collection to iterate over.
2750 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
2751
2752 #### Returns
2753 *(&#42;)*: Returns `collection`.
2754
2755 #### Example
2756 ```js
2757 _.forEachRight([1, 2], function(value) {
2758   console.log(value);
2759 });
2760 // => Logs `2` then `1`.
2761 ```
2762 * * *
2763
2764 <!-- /div -->
2765
2766 <!-- div -->
2767
2768 ### <a id="_groupbycollection-iteratee_identity"></a>`_.groupBy(collection, [iteratee=_.identity])`
2769 <a href="#_groupbycollection-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8686 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.groupby "See the npm package")
2770
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)*.
2776
2777 #### Since
2778 0.1.0
2779 #### Arguments
2780 1. `collection` *(Array|Object)*: The collection to iterate over.
2781 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee to transform keys.
2782
2783 #### Returns
2784 *(Object)*: Returns the composed aggregate object.
2785
2786 #### Example
2787 ```js
2788 _.groupBy([6.1, 4.2, 6.3], Math.floor);
2789 // => { '4': [4.2], '6': [6.1, 6.3] }
2790
2791 // The `_.property` iteratee shorthand.
2792 _.groupBy(['one', 'two', 'three'], 'length');
2793 // => { '3': ['one', 'two'], '5': ['three'] }
2794 ```
2795 * * *
2796
2797 <!-- /div -->
2798
2799 <!-- div -->
2800
2801 ### <a id="_includescollection-value-fromindex0"></a>`_.includes(collection, value, [fromIndex=0])`
2802 <a href="#_includescollection-value-fromindex0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8724 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.includes "See the npm package")
2803
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`.
2809
2810 #### Since
2811 0.1.0
2812 #### Arguments
2813 1. `collection` *(Array|Object|string)*: The collection to search.
2814 2. `value` *(&#42;)*: The value to search for.
2815 3. `[fromIndex=0]` *(number)*: The index to search from.
2816
2817 #### Returns
2818 *(boolean)*: Returns `true` if `value` is found, else `false`.
2819
2820 #### Example
2821 ```js
2822 _.includes([1, 2, 3], 1);
2823 // => true
2824
2825 _.includes([1, 2, 3], 1, 2);
2826 // => false
2827
2828 _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
2829 // => true
2830
2831 _.includes('pebbles', 'eb');
2832 // => true
2833 ```
2834 * * *
2835
2836 <!-- /div -->
2837
2838 <!-- div -->
2839
2840 ### <a id="_invokemapcollection-path-args"></a>`_.invokeMap(collection, path, [args])`
2841 <a href="#_invokemapcollection-path-args">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8760 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.invokemap "See the npm package")
2842
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`.
2847
2848 #### Since
2849 4.0.0
2850 #### Arguments
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]` *(...&#42;)*: The arguments to invoke each method with.
2854
2855 #### Returns
2856 *(Array)*: Returns the array of results.
2857
2858 #### Example
2859 ```js
2860 _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
2861 // => [[1, 5, 7], [1, 2, 3]]
2862
2863 _.invokeMap([123, 456], String.prototype.split, '');
2864 // => [['1', '2', '3'], ['4', '5', '6']]
2865 ```
2866 * * *
2867
2868 <!-- /div -->
2869
2870 <!-- div -->
2871
2872 ### <a id="_keybycollection-iteratee_identity"></a>`_.keyBy(collection, [iteratee=_.identity])`
2873 <a href="#_keybycollection-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8802 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.keyby "See the npm package")
2874
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)*.
2879
2880 #### Since
2881 4.0.0
2882 #### Arguments
2883 1. `collection` *(Array|Object)*: The collection to iterate over.
2884 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee to transform keys.
2885
2886 #### Returns
2887 *(Object)*: Returns the composed aggregate object.
2888
2889 #### Example
2890 ```js
2891 var array = [
2892   { 'dir': 'left', 'code': 97 },
2893   { 'dir': 'right', 'code': 100 }
2894 ];
2895
2896 _.keyBy(array, function(o) {
2897   return String.fromCharCode(o.code);
2898 });
2899 // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
2900
2901 _.keyBy(array, 'dir');
2902 // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
2903 ```
2904 * * *
2905
2906 <!-- /div -->
2907
2908 <!-- div -->
2909
2910 ### <a id="_mapcollection-iteratee_identity"></a>`_.map(collection, [iteratee=_.identity])`
2911 <a href="#_mapcollection-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8849 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.map "See the npm package")
2912
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)*.
2916 <br>
2917 <br>
2918 Many lodash methods are guarded to work as iteratees for methods like
2919 `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
2920 <br>
2921 <br>
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`
2927
2928 #### Since
2929 0.1.0
2930 #### Arguments
2931 1. `collection` *(Array|Object)*: The collection to iterate over.
2932 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
2933
2934 #### Returns
2935 *(Array)*: Returns the new mapped array.
2936
2937 #### Example
2938 ```js
2939 function square(n) {
2940   return n * n;
2941 }
2942
2943 _.map([4, 8], square);
2944 // => [16, 64]
2945
2946 _.map({ 'a': 4, 'b': 8 }, square);
2947 // => [16, 64] (iteration order is not guaranteed)
2948
2949 var users = [
2950   { 'user': 'barney' },
2951   { 'user': 'fred' }
2952 ];
2953
2954 // The `_.property` iteratee shorthand.
2955 _.map(users, 'user');
2956 // => ['barney', 'fred']
2957 ```
2958 * * *
2959
2960 <!-- /div -->
2961
2962 <!-- div -->
2963
2964 ### <a id="_orderbycollection-iteratees_identity-orders"></a>`_.orderBy(collection, [iteratees=[_.identity]], [orders])`
2965 <a href="#_orderbycollection-iteratees_identity-orders">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8883 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.orderby "See the npm package")
2966
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.
2971
2972 #### Since
2973 4.0.0
2974 #### Arguments
2975 1. `collection` *(Array|Object)*: The collection to iterate over.
2976 2. `[iteratees=[_.identity]]` *(Array&#91;&#93;|Function&#91;&#93;|Object&#91;&#93;|string&#91;&#93;)*: The iteratees to sort by.
2977 3. `[orders]` *(string&#91;&#93;)*: The sort orders of `iteratees`.
2978
2979 #### Returns
2980 *(Array)*: Returns the new sorted array.
2981
2982 #### Example
2983 ```js
2984 var users = [
2985   { 'user': 'fred',   'age': 48 },
2986   { 'user': 'barney', 'age': 34 },
2987   { 'user': 'fred',   'age': 40 },
2988   { 'user': 'barney', 'age': 36 }
2989 ];
2990
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]]
2994 ```
2995 * * *
2996
2997 <!-- /div -->
2998
2999 <!-- div -->
3000
3001 ### <a id="_partitioncollection-predicate_identity"></a>`_.partition(collection, [predicate=_.identity])`
3002 <a href="#_partitioncollection-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8934 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.partition "See the npm package")
3003
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)*.
3008
3009 #### Since
3010 3.0.0
3011 #### Arguments
3012 1. `collection` *(Array|Object)*: The collection to iterate over.
3013 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
3014
3015 #### Returns
3016 *(Array)*: Returns the array of grouped elements.
3017
3018 #### Example
3019 ```js
3020 var users = [
3021   { 'user': 'barney',  'age': 36, 'active': false },
3022   { 'user': 'fred',    'age': 40, 'active': true },
3023   { 'user': 'pebbles', 'age': 1,  'active': false }
3024 ];
3025
3026 _.partition(users, function(o) { return o.active; });
3027 // => objects for [['fred'], ['barney', 'pebbles']]
3028
3029 // The `_.matches` iteratee shorthand.
3030 _.partition(users, { 'age': 1, 'active': false });
3031 // => objects for [['pebbles'], ['barney', 'fred']]
3032
3033 // The `_.matchesProperty` iteratee shorthand.
3034 _.partition(users, ['active', false]);
3035 // => objects for [['barney', 'pebbles'], ['fred']]
3036
3037 // The `_.property` iteratee shorthand.
3038 _.partition(users, 'active');
3039 // => objects for [['fred'], ['barney', 'pebbles']]
3040 ```
3041 * * *
3042
3043 <!-- /div -->
3044
3045 <!-- div -->
3046
3047 ### <a id="_reducecollection-iteratee_identity-accumulator"></a>`_.reduce(collection, [iteratee=_.identity], [accumulator])`
3048 <a href="#_reducecollection-iteratee_identity-accumulator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8975 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.reduce "See the npm package")
3049
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)*.
3056 <br>
3057 <br>
3058 Many lodash methods are guarded to work as iteratees for methods like
3059 `_.reduce`, `_.reduceRight`, and `_.transform`.
3060 <br>
3061 <br>
3062 The guarded methods are:<br>
3063 `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
3064 and `sortBy`
3065
3066 #### Since
3067 0.1.0
3068 #### Arguments
3069 1. `collection` *(Array|Object)*: The collection to iterate over.
3070 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
3071 3. `[accumulator]` *(&#42;)*: The initial value.
3072
3073 #### Returns
3074 *(&#42;)*: Returns the accumulated value.
3075
3076 #### Example
3077 ```js
3078 _.reduce([1, 2], function(sum, n) {
3079   return sum + n;
3080 }, 0);
3081 // => 3
3082
3083 _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
3084   (result[value] || (result[value] = [])).push(key);
3085   return result;
3086 }, {});
3087 // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
3088 ```
3089 * * *
3090
3091 <!-- /div -->
3092
3093 <!-- div -->
3094
3095 ### <a id="_reducerightcollection-iteratee_identity-accumulator"></a>`_.reduceRight(collection, [iteratee=_.identity], [accumulator])`
3096 <a href="#_reducerightcollection-iteratee_identity-accumulator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9004 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.reduceright "See the npm package")
3097
3098 This method is like `_.reduce` except that it iterates over elements of
3099 `collection` from right to left.
3100
3101 #### Since
3102 0.1.0
3103 #### Arguments
3104 1. `collection` *(Array|Object)*: The collection to iterate over.
3105 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
3106 3. `[accumulator]` *(&#42;)*: The initial value.
3107
3108 #### Returns
3109 *(&#42;)*: Returns the accumulated value.
3110
3111 #### Example
3112 ```js
3113 var array = [[0, 1], [2, 3], [4, 5]];
3114
3115 _.reduceRight(array, function(flattened, other) {
3116   return flattened.concat(other);
3117 }, []);
3118 // => [4, 5, 2, 3, 0, 1]
3119 ```
3120 * * *
3121
3122 <!-- /div -->
3123
3124 <!-- div -->
3125
3126 ### <a id="_rejectcollection-predicate_identity"></a>`_.reject(collection, [predicate=_.identity])`
3127 <a href="#_rejectcollection-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9046 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.reject "See the npm package")
3128
3129 The opposite of `_.filter`; this method returns the elements of `collection`
3130 that `predicate` does **not** return truthy for.
3131
3132 #### Since
3133 0.1.0
3134 #### Arguments
3135 1. `collection` *(Array|Object)*: The collection to iterate over.
3136 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
3137
3138 #### Returns
3139 *(Array)*: Returns the new filtered array.
3140
3141 #### Example
3142 ```js
3143 var users = [
3144   { 'user': 'barney', 'age': 36, 'active': false },
3145   { 'user': 'fred',   'age': 40, 'active': true }
3146 ];
3147
3148 _.reject(users, function(o) { return !o.active; });
3149 // => objects for ['fred']
3150
3151 // The `_.matches` iteratee shorthand.
3152 _.reject(users, { 'age': 40, 'active': true });
3153 // => objects for ['barney']
3154
3155 // The `_.matchesProperty` iteratee shorthand.
3156 _.reject(users, ['active', false]);
3157 // => objects for ['fred']
3158
3159 // The `_.property` iteratee shorthand.
3160 _.reject(users, 'active');
3161 // => objects for ['barney']
3162 ```
3163 * * *
3164
3165 <!-- /div -->
3166
3167 <!-- div -->
3168
3169 ### <a id="_samplecollection"></a>`_.sample(collection)`
3170 <a href="#_samplecollection">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9068 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sample "See the npm package")
3171
3172 Gets a random element from `collection`.
3173
3174 #### Since
3175 2.0.0
3176 #### Arguments
3177 1. `collection` *(Array|Object)*: The collection to sample.
3178
3179 #### Returns
3180 *(&#42;)*: Returns the random element.
3181
3182 #### Example
3183 ```js
3184 _.sample([1, 2, 3, 4]);
3185 // => 2
3186 ```
3187 * * *
3188
3189 <!-- /div -->
3190
3191 <!-- div -->
3192
3193 ### <a id="_samplesizecollection-n1"></a>`_.sampleSize(collection, [n=1])`
3194 <a href="#_samplesizecollection-n1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9095 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.samplesize "See the npm package")
3195
3196 Gets `n` random elements at unique keys from `collection` up to the
3197 size of `collection`.
3198
3199 #### Since
3200 4.0.0
3201 #### Arguments
3202 1. `collection` *(Array|Object)*: The collection to sample.
3203 2. `[n=1]` *(number)*: The number of elements to sample.
3204
3205 #### Returns
3206 *(Array)*: Returns the random elements.
3207
3208 #### Example
3209 ```js
3210 _.sampleSize([1, 2, 3], 2);
3211 // => [3, 1]
3212
3213 _.sampleSize([1, 2, 3], 4);
3214 // => [2, 3, 1]
3215 ```
3216 * * *
3217
3218 <!-- /div -->
3219
3220 <!-- div -->
3221
3222 ### <a id="_shufflecollection"></a>`_.shuffle(collection)`
3223 <a href="#_shufflecollection">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9132 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.shuffle "See the npm package")
3224
3225 Creates an array of shuffled values, using a version of the
3226 [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
3227
3228 #### Since
3229 0.1.0
3230 #### Arguments
3231 1. `collection` *(Array|Object)*: The collection to shuffle.
3232
3233 #### Returns
3234 *(Array)*: Returns the new shuffled array.
3235
3236 #### Example
3237 ```js
3238 _.shuffle([1, 2, 3, 4]);
3239 // => [4, 1, 3, 2]
3240 ```
3241 * * *
3242
3243 <!-- /div -->
3244
3245 <!-- div -->
3246
3247 ### <a id="_sizecollection"></a>`_.size(collection)`
3248 <a href="#_sizecollection">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9157 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.size "See the npm package")
3249
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.
3252
3253 #### Since
3254 0.1.0
3255 #### Arguments
3256 1. `collection` *(Array|Object)*: The collection to inspect.
3257
3258 #### Returns
3259 *(number)*: Returns the collection size.
3260
3261 #### Example
3262 ```js
3263 _.size([1, 2, 3]);
3264 // => 3
3265
3266 _.size({ 'a': 1, 'b': 2 });
3267 // => 2
3268
3269 _.size('pebbles');
3270 // => 7
3271 ```
3272 * * *
3273
3274 <!-- /div -->
3275
3276 <!-- div -->
3277
3278 ### <a id="_somecollection-predicate_identity"></a>`_.some(collection, [predicate=_.identity])`
3279 <a href="#_somecollection-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9211 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.some "See the npm package")
3280
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)*.
3284
3285 #### Since
3286 0.1.0
3287 #### Arguments
3288 1. `collection` *(Array|Object)*: The collection to iterate over.
3289 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
3290
3291 #### Returns
3292 *(boolean)*: Returns `true` if any element passes the predicate check, else `false`.
3293
3294 #### Example
3295 ```js
3296 _.some([null, 0, 'yes', false], Boolean);
3297 // => true
3298
3299 var users = [
3300   { 'user': 'barney', 'active': true },
3301   { 'user': 'fred',   'active': false }
3302 ];
3303
3304 // The `_.matches` iteratee shorthand.
3305 _.some(users, { 'user': 'barney', 'active': false });
3306 // => false
3307
3308 // The `_.matchesProperty` iteratee shorthand.
3309 _.some(users, ['active', false]);
3310 // => true
3311
3312 // The `_.property` iteratee shorthand.
3313 _.some(users, 'active');
3314 // => true
3315 ```
3316 * * *
3317
3318 <!-- /div -->
3319
3320 <!-- div -->
3321
3322 ### <a id="_sortbycollection-iteratees_identity"></a>`_.sortBy(collection, [iteratees=[_.identity]])`
3323 <a href="#_sortbycollection-iteratees_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9253 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sortby "See the npm package")
3324
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)*.
3329
3330 #### Since
3331 0.1.0
3332 #### Arguments
3333 1. `collection` *(Array|Object)*: The collection to iterate over.
3334 2. `[iteratees=[_.identity]]` *(...(Array|Array&#91;&#93;|Function|Function&#91;&#93;|Object|Object&#91;&#93;|string|string&#91;&#93;))*: The iteratees to sort by.
3335
3336 #### Returns
3337 *(Array)*: Returns the new sorted array.
3338
3339 #### Example
3340 ```js
3341 var users = [
3342   { 'user': 'fred',   'age': 48 },
3343   { 'user': 'barney', 'age': 36 },
3344   { 'user': 'fred',   'age': 40 },
3345   { 'user': 'barney', 'age': 34 }
3346 ];
3347
3348 _.sortBy(users, function(o) { return o.user; });
3349 // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
3350
3351 _.sortBy(users, ['user', 'age']);
3352 // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
3353
3354 _.sortBy(users, 'user', function(o) {
3355   return Math.floor(o.age / 10);
3356 });
3357 // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
3358 ```
3359 * * *
3360
3361 <!-- /div -->
3362
3363 <!-- /div -->
3364
3365 <!-- div -->
3366
3367 ## `“Date” Methods`
3368
3369 <!-- div -->
3370
3371 ### <a id="_now"></a>`_.now()`
3372 <a href="#_now">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9288 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.now "See the npm package")
3373
3374 Gets the timestamp of the number of milliseconds that have elapsed since
3375 the Unix epoch *(1 January `1970 00`:00:00 UTC)*.
3376
3377 #### Since
3378 2.4.0
3379 #### Returns
3380 *(number)*: Returns the timestamp.
3381
3382 #### Example
3383 ```js
3384 _.defer(function(stamp) {
3385   console.log(_.now() - stamp);
3386 }, _.now());
3387 // => Logs the number of milliseconds it took for the deferred invocation.
3388 ```
3389 * * *
3390
3391 <!-- /div -->
3392
3393 <!-- /div -->
3394
3395 <!-- div -->
3396
3397 ## `“Function” Methods`
3398
3399 <!-- div -->
3400
3401 ### <a id="_aftern-func"></a>`_.after(n, func)`
3402 <a href="#_aftern-func">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9318 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.after "See the npm package")
3403
3404 The opposite of `_.before`; this method creates a function that invokes
3405 `func` once it's called `n` or more times.
3406
3407 #### Since
3408 0.1.0
3409 #### Arguments
3410 1. `n` *(number)*: The number of calls before `func` is invoked.
3411 2. `func` *(Function)*: The function to restrict.
3412
3413 #### Returns
3414 *(Function)*: Returns the new restricted function.
3415
3416 #### Example
3417 ```js
3418 var saves = ['profile', 'settings'];
3419
3420 var done = _.after(saves.length, function() {
3421   console.log('done saving!');
3422 });
3423
3424 _.forEach(saves, function(type) {
3425   asyncSave({ 'type': type, 'complete': done });
3426 });
3427 // => Logs 'done saving!' after the two async saves have completed.
3428 ```
3429 * * *
3430
3431 <!-- /div -->
3432
3433 <!-- div -->
3434
3435 ### <a id="_aryfunc-nfunclength"></a>`_.ary(func, [n=func.length])`
3436 <a href="#_aryfunc-nfunclength">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9347 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.ary "See the npm package")
3437
3438 Creates a function that invokes `func`, with up to `n` arguments,
3439 ignoring any additional arguments.
3440
3441 #### Since
3442 3.0.0
3443 #### Arguments
3444 1. `func` *(Function)*: The function to cap arguments for.
3445 2. `[n=func.length]` *(number)*: The arity cap.
3446
3447 #### Returns
3448 *(Function)*: Returns the new capped function.
3449
3450 #### Example
3451 ```js
3452 _.map(['6', '8', '10'], _.ary(parseInt, 1));
3453 // => [6, 8, 10]
3454 ```
3455 * * *
3456
3457 <!-- /div -->
3458
3459 <!-- div -->
3460
3461 ### <a id="_beforen-func"></a>`_.before(n, func)`
3462 <a href="#_beforen-func">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9370 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.before "See the npm package")
3463
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.
3467
3468 #### Since
3469 3.0.0
3470 #### Arguments
3471 1. `n` *(number)*: The number of calls at which `func` is no longer invoked.
3472 2. `func` *(Function)*: The function to restrict.
3473
3474 #### Returns
3475 *(Function)*: Returns the new restricted function.
3476
3477 #### Example
3478 ```js
3479 jQuery(element).on('click', _.before(5, addContactToList));
3480 // => allows adding up to 4 contacts to the list
3481 ```
3482 * * *
3483
3484 <!-- /div -->
3485
3486 <!-- div -->
3487
3488 ### <a id="_bindfunc-thisarg-partials"></a>`_.bind(func, thisArg, [partials])`
3489 <a href="#_bindfunc-thisarg-partials">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9422 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.bind "See the npm package")
3490
3491 Creates a function that invokes `func` with the `this` binding of `thisArg`
3492 and `partials` prepended to the arguments it receives.
3493 <br>
3494 <br>
3495 The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
3496 may be used as a placeholder for partially applied arguments.
3497 <br>
3498 <br>
3499 **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
3500 property of bound functions.
3501
3502 #### Since
3503 0.1.0
3504 #### Arguments
3505 1. `func` *(Function)*: The function to bind.
3506 2. `thisArg` *(&#42;)*: The `this` binding of `func`.
3507 3. `[partials]` *(...&#42;)*: The arguments to be partially applied.
3508
3509 #### Returns
3510 *(Function)*: Returns the new bound function.
3511
3512 #### Example
3513 ```js
3514 var greet = function(greeting, punctuation) {
3515   return greeting + ' ' + this.user + punctuation;
3516 };
3517
3518 var object = { 'user': 'fred' };
3519
3520 var bound = _.bind(greet, object, 'hi');
3521 bound('!');
3522 // => 'hi fred!'
3523
3524 // Bound with placeholders.
3525 var bound = _.bind(greet, object, _, '!');
3526 bound('hi');
3527 // => 'hi fred!'
3528 ```
3529 * * *
3530
3531 <!-- /div -->
3532
3533 <!-- div -->
3534
3535 ### <a id="_bindkeyobject-key-partials"></a>`_.bindKey(object, key, [partials])`
3536 <a href="#_bindkeyobject-key-partials">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9476 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.bindkey "See the npm package")
3537
3538 Creates a function that invokes the method at `object[key]` with `partials`
3539 prepended to the arguments it receives.
3540 <br>
3541 <br>
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)
3545 for more details.
3546 <br>
3547 <br>
3548 The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
3549 builds, may be used as a placeholder for partially applied arguments.
3550
3551 #### Since
3552 0.10.0
3553 #### Arguments
3554 1. `object` *(Object)*: The object to invoke the method on.
3555 2. `key` *(string)*: The key of the method.
3556 3. `[partials]` *(...&#42;)*: The arguments to be partially applied.
3557
3558 #### Returns
3559 *(Function)*: Returns the new bound function.
3560
3561 #### Example
3562 ```js
3563 var object = {
3564   'user': 'fred',
3565   'greet': function(greeting, punctuation) {
3566     return greeting + ' ' + this.user + punctuation;
3567   }
3568 };
3569
3570 var bound = _.bindKey(object, 'greet', 'hi');
3571 bound('!');
3572 // => 'hi fred!'
3573
3574 object.greet = function(greeting, punctuation) {
3575   return greeting + 'ya ' + this.user + punctuation;
3576 };
3577
3578 bound('!');
3579 // => 'hiya fred!'
3580
3581 // Bound with placeholders.
3582 var bound = _.bindKey(object, 'greet', _, '!');
3583 bound('hi');
3584 // => 'hiya fred!'
3585 ```
3586 * * *
3587
3588 <!-- /div -->
3589
3590 <!-- div -->
3591
3592 ### <a id="_curryfunc-arityfunclength"></a>`_.curry(func, [arity=func.length])`
3593 <a href="#_curryfunc-arityfunclength">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9526 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.curry "See the npm package")
3594
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`
3599 is not sufficient.
3600 <br>
3601 <br>
3602 The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
3603 may be used as a placeholder for provided arguments.
3604 <br>
3605 <br>
3606 **Note:** This method doesn't set the "length" property of curried functions.
3607
3608 #### Since
3609 2.0.0
3610 #### Arguments
3611 1. `func` *(Function)*: The function to curry.
3612 2. `[arity=func.length]` *(number)*: The arity of `func`.
3613
3614 #### Returns
3615 *(Function)*: Returns the new curried function.
3616
3617 #### Example
3618 ```js
3619 var abc = function(a, b, c) {
3620   return [a, b, c];
3621 };
3622
3623 var curried = _.curry(abc);
3624
3625 curried(1)(2)(3);
3626 // => [1, 2, 3]
3627
3628 curried(1, 2)(3);
3629 // => [1, 2, 3]
3630
3631 curried(1, 2, 3);
3632 // => [1, 2, 3]
3633
3634 // Curried with placeholders.
3635 curried(1)(_, 3)(2);
3636 // => [1, 2, 3]
3637 ```
3638 * * *
3639
3640 <!-- /div -->
3641
3642 <!-- div -->
3643
3644 ### <a id="_curryrightfunc-arityfunclength"></a>`_.curryRight(func, [arity=func.length])`
3645 <a href="#_curryrightfunc-arityfunclength">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9571 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.curryright "See the npm package")
3646
3647 This method is like `_.curry` except that arguments are applied to `func`
3648 in the manner of `_.partialRight` instead of `_.partial`.
3649 <br>
3650 <br>
3651 The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
3652 builds, may be used as a placeholder for provided arguments.
3653 <br>
3654 <br>
3655 **Note:** This method doesn't set the "length" property of curried functions.
3656
3657 #### Since
3658 3.0.0
3659 #### Arguments
3660 1. `func` *(Function)*: The function to curry.
3661 2. `[arity=func.length]` *(number)*: The arity of `func`.
3662
3663 #### Returns
3664 *(Function)*: Returns the new curried function.
3665
3666 #### Example
3667 ```js
3668 var abc = function(a, b, c) {
3669   return [a, b, c];
3670 };
3671
3672 var curried = _.curryRight(abc);
3673
3674 curried(3)(2)(1);
3675 // => [1, 2, 3]
3676
3677 curried(2, 3)(1);
3678 // => [1, 2, 3]
3679
3680 curried(1, 2, 3);
3681 // => [1, 2, 3]
3682
3683 // Curried with placeholders.
3684 curried(3)(1, _)(2);
3685 // => [1, 2, 3]
3686 ```
3687 * * *
3688
3689 <!-- /div -->
3690
3691 <!-- div -->
3692
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> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9628 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.debounce "See the npm package")
3695
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.
3704 <br>
3705 <br>
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.
3709 <br>
3710 <br>
3711 See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
3712 for details over the differences between `_.debounce` and `_.throttle`.
3713
3714 #### Since
3715 0.1.0
3716 #### Arguments
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.
3723
3724 #### Returns
3725 *(Function)*: Returns the new debounced function.
3726
3727 #### Example
3728 ```js
3729 // Avoid costly calculations while the window size is in flux.
3730 jQuery(window).on('resize', _.debounce(calculateLayout, 150));
3731
3732 // Invoke `sendMail` when clicked, debouncing subsequent calls.
3733 jQuery(element).on('click', _.debounce(sendMail, 300, {
3734   'leading': true,
3735   'trailing': false
3736 }));
3737
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);
3742
3743 // Cancel the trailing debounced invocation.
3744 jQuery(window).on('popstate', debounced.cancel);
3745 ```
3746 * * *
3747
3748 <!-- /div -->
3749
3750 <!-- div -->
3751
3752 ### <a id="_deferfunc-args"></a>`_.defer(func, [args])`
3753 <a href="#_deferfunc-args">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9765 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.defer "See the npm package")
3754
3755 Defers invoking the `func` until the current call stack has cleared. Any
3756 additional arguments are provided to `func` when it's invoked.
3757
3758 #### Since
3759 0.1.0
3760 #### Arguments
3761 1. `func` *(Function)*: The function to defer.
3762 2. `[args]` *(...&#42;)*: The arguments to invoke `func` with.
3763
3764 #### Returns
3765 *(number)*: Returns the timer id.
3766
3767 #### Example
3768 ```js
3769 _.defer(function(text) {
3770   console.log(text);
3771 }, 'deferred');
3772 // => Logs 'deferred' after one or more milliseconds.
3773 ```
3774 * * *
3775
3776 <!-- /div -->
3777
3778 <!-- div -->
3779
3780 ### <a id="_delayfunc-wait-args"></a>`_.delay(func, wait, [args])`
3781 <a href="#_delayfunc-wait-args">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9788 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.delay "See the npm package")
3782
3783 Invokes `func` after `wait` milliseconds. Any additional arguments are
3784 provided to `func` when it's invoked.
3785
3786 #### Since
3787 0.1.0
3788 #### Arguments
3789 1. `func` *(Function)*: The function to delay.
3790 2. `wait` *(number)*: The number of milliseconds to delay invocation.
3791 3. `[args]` *(...&#42;)*: The arguments to invoke `func` with.
3792
3793 #### Returns
3794 *(number)*: Returns the timer id.
3795
3796 #### Example
3797 ```js
3798 _.delay(function(text) {
3799   console.log(text);
3800 }, 1000, 'later');
3801 // => Logs 'later' after one second.
3802 ```
3803 * * *
3804
3805 <!-- /div -->
3806
3807 <!-- div -->
3808
3809 ### <a id="_flipfunc"></a>`_.flip(func)`
3810 <a href="#_flipfunc">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9810 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.flip "See the npm package")
3811
3812 Creates a function that invokes `func` with arguments reversed.
3813
3814 #### Since
3815 4.0.0
3816 #### Arguments
3817 1. `func` *(Function)*: The function to flip arguments for.
3818
3819 #### Returns
3820 *(Function)*: Returns the new flipped function.
3821
3822 #### Example
3823 ```js
3824 var flipped = _.flip(function() {
3825   return _.toArray(arguments);
3826 });
3827
3828 flipped('a', 'b', 'c', 'd');
3829 // => ['d', 'c', 'b', 'a']
3830 ```
3831 * * *
3832
3833 <!-- /div -->
3834
3835 <!-- div -->
3836
3837 ### <a id="_memoizefunc-resolver"></a>`_.memoize(func, [resolver])`
3838 <a href="#_memoizefunc-resolver">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9858 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.memoize "See the npm package")
3839
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.
3845 <br>
3846 <br>
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`.
3852
3853 #### Since
3854 0.1.0
3855 #### Arguments
3856 1. `func` *(Function)*: The function to have its output memoized.
3857 2. `[resolver]` *(Function)*: The function to resolve the cache key.
3858
3859 #### Returns
3860 *(Function)*: Returns the new memoized function.
3861
3862 #### Example
3863 ```js
3864 var object = { 'a': 1, 'b': 2 };
3865 var other = { 'c': 3, 'd': 4 };
3866
3867 var values = _.memoize(_.values);
3868 values(object);
3869 // => [1, 2]
3870
3871 values(other);
3872 // => [3, 4]
3873
3874 object.a = 2;
3875 values(object);
3876 // => [1, 2]
3877
3878 // Modify the result cache.
3879 values.cache.set(object, ['a', 'b']);
3880 values(object);
3881 // => ['a', 'b']
3882
3883 // Replace `_.memoize.Cache`.
3884 _.memoize.Cache = WeakMap;
3885 ```
3886 * * *
3887
3888 <!-- /div -->
3889
3890 <!-- div -->
3891
3892 ### <a id="_negatepredicate"></a>`_.negate(predicate)`
3893 <a href="#_negatepredicate">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9901 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.negate "See the npm package")
3894
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
3897 created function.
3898
3899 #### Since
3900 3.0.0
3901 #### Arguments
3902 1. `predicate` *(Function)*: The predicate to negate.
3903
3904 #### Returns
3905 *(Function)*: Returns the new negated function.
3906
3907 #### Example
3908 ```js
3909 function isEven(n) {
3910   return n % 2 == 0;
3911 }
3912
3913 _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
3914 // => [1, 3, 5]
3915 ```
3916 * * *
3917
3918 <!-- /div -->
3919
3920 <!-- div -->
3921
3922 ### <a id="_oncefunc"></a>`_.once(func)`
3923 <a href="#_oncefunc">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9928 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.once "See the npm package")
3924
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.
3928
3929 #### Since
3930 0.1.0
3931 #### Arguments
3932 1. `func` *(Function)*: The function to restrict.
3933
3934 #### Returns
3935 *(Function)*: Returns the new restricted function.
3936
3937 #### Example
3938 ```js
3939 var initialize = _.once(createApplication);
3940 initialize();
3941 initialize();
3942 // `initialize` invokes `createApplication` once
3943 ```
3944 * * *
3945
3946 <!-- /div -->
3947
3948 <!-- div -->
3949
3950 ### <a id="_overargsfunc"></a>`_.overArgs(func)`
3951 <a href="#_overargsfunc">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L9964 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.overargs "See the npm package")
3952
3953 Creates a function that invokes `func` with arguments transformed by
3954 corresponding `transforms`.
3955
3956 #### Since
3957 4.0.0
3958 #### Arguments
3959 1. `func` *(Function)*: The function to wrap.
3960
3961 #### Returns
3962 *(Function)*: Returns the new function.
3963
3964 #### Example
3965 ```js
3966 function doubled(n) {
3967   return n * 2;
3968 }
3969
3970 function square(n) {
3971   return n * n;
3972 }
3973
3974 var func = _.overArgs(function(x, y) {
3975   return [x, y];
3976 }, [square, doubled]);
3977
3978 func(9, 3);
3979 // => [81, 6]
3980
3981 func(10, 5);
3982 // => [100, 10]
3983 ```
3984 * * *
3985
3986 <!-- /div -->
3987
3988 <!-- div -->
3989
3990 ### <a id="_partialfunc-partials"></a>`_.partial(func, [partials])`
3991 <a href="#_partialfunc-partials">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10014 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.partial "See the npm package")
3992
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.
3996 <br>
3997 <br>
3998 The `_.partial.placeholder` value, which defaults to `_` in monolithic
3999 builds, may be used as a placeholder for partially applied arguments.
4000 <br>
4001 <br>
4002 **Note:** This method doesn't set the "length" property of partially
4003 applied functions.
4004
4005 #### Since
4006 0.2.0
4007 #### Arguments
4008 1. `func` *(Function)*: The function to partially apply arguments to.
4009 2. `[partials]` *(...&#42;)*: The arguments to be partially applied.
4010
4011 #### Returns
4012 *(Function)*: Returns the new partially applied function.
4013
4014 #### Example
4015 ```js
4016 var greet = function(greeting, name) {
4017   return greeting + ' ' + name;
4018 };
4019
4020 var sayHelloTo = _.partial(greet, 'hello');
4021 sayHelloTo('fred');
4022 // => 'hello fred'
4023
4024 // Partially applied with placeholders.
4025 var greetFred = _.partial(greet, _, 'fred');
4026 greetFred('hi');
4027 // => 'hi fred'
4028 ```
4029 * * *
4030
4031 <!-- /div -->
4032
4033 <!-- div -->
4034
4035 ### <a id="_partialrightfunc-partials"></a>`_.partialRight(func, [partials])`
4036 <a href="#_partialrightfunc-partials">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10051 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.partialright "See the npm package")
4037
4038 This method is like `_.partial` except that partially applied arguments
4039 are appended to the arguments it receives.
4040 <br>
4041 <br>
4042 The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
4043 builds, may be used as a placeholder for partially applied arguments.
4044 <br>
4045 <br>
4046 **Note:** This method doesn't set the "length" property of partially
4047 applied functions.
4048
4049 #### Since
4050 1.0.0
4051 #### Arguments
4052 1. `func` *(Function)*: The function to partially apply arguments to.
4053 2. `[partials]` *(...&#42;)*: The arguments to be partially applied.
4054
4055 #### Returns
4056 *(Function)*: Returns the new partially applied function.
4057
4058 #### Example
4059 ```js
4060 var greet = function(greeting, name) {
4061   return greeting + ' ' + name;
4062 };
4063
4064 var greetFred = _.partialRight(greet, 'fred');
4065 greetFred('hi');
4066 // => 'hi fred'
4067
4068 // Partially applied with placeholders.
4069 var sayHelloTo = _.partialRight(greet, 'hello', _);
4070 sayHelloTo('fred');
4071 // => 'hello fred'
4072 ```
4073 * * *
4074
4075 <!-- /div -->
4076
4077 <!-- div -->
4078
4079 ### <a id="_reargfunc-indexes"></a>`_.rearg(func, indexes)`
4080 <a href="#_reargfunc-indexes">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10078 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.rearg "See the npm package")
4081
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.
4086
4087 #### Since
4088 3.0.0
4089 #### Arguments
4090 1. `func` *(Function)*: The function to rearrange arguments for.
4091 2. `indexes` *(...(number|number&#91;&#93;))*: The arranged argument indexes.
4092
4093 #### Returns
4094 *(Function)*: Returns the new function.
4095
4096 #### Example
4097 ```js
4098 var rearged = _.rearg(function(a, b, c) {
4099   return [a, b, c];
4100 }, [2, 0, 1]);
4101
4102 rearged('b', 'c', 'a')
4103 // => ['a', 'b', 'c']
4104 ```
4105 * * *
4106
4107 <!-- /div -->
4108
4109 <!-- div -->
4110
4111 ### <a id="_restfunc-startfunclength-1"></a>`_.rest(func, [start=func.length-1])`
4112 <a href="#_restfunc-startfunclength-1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10107 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.rest "See the npm package")
4113
4114 Creates a function that invokes `func` with the `this` binding of the
4115 created function and arguments from `start` and beyond provided as
4116 an array.
4117 <br>
4118 <br>
4119 **Note:** This method is based on the
4120 [rest parameter](https://mdn.io/rest_parameters).
4121
4122 #### Since
4123 4.0.0
4124 #### Arguments
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.
4127
4128 #### Returns
4129 *(Function)*: Returns the new function.
4130
4131 #### Example
4132 ```js
4133 var say = _.rest(function(what, names) {
4134   return what + ' ' + _.initial(names).join(', ') +
4135     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
4136 });
4137
4138 say('hello', 'fred', 'barney', 'pebbles');
4139 // => 'hello fred, barney, & pebbles'
4140 ```
4141 * * *
4142
4143 <!-- /div -->
4144
4145 <!-- div -->
4146
4147 ### <a id="_spreadfunc-start0"></a>`_.spread(func, [start=0])`
4148 <a href="#_spreadfunc-start0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10170 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.spread "See the npm package")
4149
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).
4153 <br>
4154 <br>
4155 **Note:** This method is based on the
4156 [spread operator](https://mdn.io/spread_operator).
4157
4158 #### Since
4159 3.2.0
4160 #### Arguments
4161 1. `func` *(Function)*: The function to spread arguments over.
4162 2. `[start=0]` *(number)*: The start position of the spread.
4163
4164 #### Returns
4165 *(Function)*: Returns the new function.
4166
4167 #### Example
4168 ```js
4169 var say = _.spread(function(who, what) {
4170   return who + ' says ' + what;
4171 });
4172
4173 say(['fred', 'hello']);
4174 // => 'fred says hello'
4175
4176 var numbers = Promise.all([
4177   Promise.resolve(40),
4178   Promise.resolve(36)
4179 ]);
4180
4181 numbers.then(_.spread(function(x, y) {
4182   return x + y;
4183 }));
4184 // => a Promise of 76
4185 ```
4186 * * *
4187
4188 <!-- /div -->
4189
4190 <!-- div -->
4191
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> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10227 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.throttle "See the npm package")
4194
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.
4203 <br>
4204 <br>
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.
4208 <br>
4209 <br>
4210 See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
4211 for details over the differences between `_.throttle` and `_.debounce`.
4212
4213 #### Since
4214 0.1.0
4215 #### Arguments
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.
4221
4222 #### Returns
4223 *(Function)*: Returns the new throttled function.
4224
4225 #### Example
4226 ```js
4227 // Avoid excessively updating the position while scrolling.
4228 jQuery(window).on('scroll', _.throttle(updatePosition, 100));
4229
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);
4233
4234 // Cancel the trailing throttled invocation.
4235 jQuery(window).on('popstate', throttled.cancel);
4236 ```
4237 * * *
4238
4239 <!-- /div -->
4240
4241 <!-- div -->
4242
4243 ### <a id="_unaryfunc"></a>`_.unary(func)`
4244 <a href="#_unaryfunc">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10260 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.unary "See the npm package")
4245
4246 Creates a function that accepts up to one argument, ignoring any
4247 additional arguments.
4248
4249 #### Since
4250 4.0.0
4251 #### Arguments
4252 1. `func` *(Function)*: The function to cap arguments for.
4253
4254 #### Returns
4255 *(Function)*: Returns the new capped function.
4256
4257 #### Example
4258 ```js
4259 _.map(['6', '8', '10'], _.unary(parseInt));
4260 // => [6, 8, 10]
4261 ```
4262 * * *
4263
4264 <!-- /div -->
4265
4266 <!-- div -->
4267
4268 ### <a id="_wrapvalue-wrapperidentity"></a>`_.wrap(value, [wrapper=identity])`
4269 <a href="#_wrapvalue-wrapperidentity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10286 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.wrap "See the npm package")
4270
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.
4275
4276 #### Since
4277 0.1.0
4278 #### Arguments
4279 1. `value` *(&#42;)*: The value to wrap.
4280 2. `[wrapper=identity]` *(Function)*: The wrapper function.
4281
4282 #### Returns
4283 *(Function)*: Returns the new function.
4284
4285 #### Example
4286 ```js
4287 var p = _.wrap(_.escape, function(func, text) {
4288   return '<p>' + func(text) + '</p>';
4289 });
4290
4291 p('fred, barney, & pebbles');
4292 // => '<p>fred, barney, &amp; pebbles</p>'
4293 ```
4294 * * *
4295
4296 <!-- /div -->
4297
4298 <!-- /div -->
4299
4300 <!-- div -->
4301
4302 ## `“Lang” Methods`
4303
4304 <!-- div -->
4305
4306 ### <a id="_castarrayvalue"></a>`_.castArray(value)`
4307 <a href="#_castarrayvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10326 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.castarray "See the npm package")
4308
4309 Casts `value` as an array if it's not one.
4310
4311 #### Since
4312 4.4.0
4313 #### Arguments
4314 1. `value` *(&#42;)*: The value to inspect.
4315
4316 #### Returns
4317 *(Array)*: Returns the cast array.
4318
4319 #### Example
4320 ```js
4321 _.castArray(1);
4322 // => [1]
4323
4324 _.castArray({ 'a': 1 });
4325 // => [{ 'a': 1 }]
4326
4327 _.castArray('abc');
4328 // => ['abc']
4329
4330 _.castArray(null);
4331 // => [null]
4332
4333 _.castArray(undefined);
4334 // => [undefined]
4335
4336 _.castArray();
4337 // => []
4338
4339 var array = [1, 2, 3];
4340 console.log(_.castArray(array) === array);
4341 // => true
4342 ```
4343 * * *
4344
4345 <!-- /div -->
4346
4347 <!-- div -->
4348
4349 ### <a id="_clonevalue"></a>`_.clone(value)`
4350 <a href="#_clonevalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10360 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.clone "See the npm package")
4351
4352 Creates a shallow clone of `value`.
4353 <br>
4354 <br>
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.
4362
4363 #### Since
4364 0.1.0
4365 #### Arguments
4366 1. `value` *(&#42;)*: The value to clone.
4367
4368 #### Returns
4369 *(&#42;)*: Returns the cloned value.
4370
4371 #### Example
4372 ```js
4373 var objects = [{ 'a': 1 }, { 'b': 2 }];
4374
4375 var shallow = _.clone(objects);
4376 console.log(shallow[0] === objects[0]);
4377 // => true
4378 ```
4379 * * *
4380
4381 <!-- /div -->
4382
4383 <!-- div -->
4384
4385 ### <a id="_clonedeepvalue"></a>`_.cloneDeep(value)`
4386 <a href="#_clonedeepvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10417 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.clonedeep "See the npm package")
4387
4388 This method is like `_.clone` except that it recursively clones `value`.
4389
4390 #### Since
4391 1.0.0
4392 #### Arguments
4393 1. `value` *(&#42;)*: The value to recursively clone.
4394
4395 #### Returns
4396 *(&#42;)*: Returns the deep cloned value.
4397
4398 #### Example
4399 ```js
4400 var objects = [{ 'a': 1 }, { 'b': 2 }];
4401
4402 var deep = _.cloneDeep(objects);
4403 console.log(deep[0] === objects[0]);
4404 // => false
4405 ```
4406 * * *
4407
4408 <!-- /div -->
4409
4410 <!-- div -->
4411
4412 ### <a id="_clonedeepwithvalue-customizer"></a>`_.cloneDeepWith(value, [customizer])`
4413 <a href="#_clonedeepwithvalue-customizer">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10449 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.clonedeepwith "See the npm package")
4414
4415 This method is like `_.cloneWith` except that it recursively clones `value`.
4416
4417 #### Since
4418 4.0.0
4419 #### Arguments
4420 1. `value` *(&#42;)*: The value to recursively clone.
4421 2. `[customizer]` *(Function)*: The function to customize cloning.
4422
4423 #### Returns
4424 *(&#42;)*: Returns the deep cloned value.
4425
4426 #### Example
4427 ```js
4428 function customizer(value) {
4429   if (_.isElement(value)) {
4430     return value.cloneNode(true);
4431   }
4432 }
4433
4434 var el = _.cloneDeepWith(document.body, customizer);
4435
4436 console.log(el === document.body);
4437 // => false
4438 console.log(el.nodeName);
4439 // => 'BODY'
4440 console.log(el.childNodes.length);
4441 // => 20
4442 ```
4443 * * *
4444
4445 <!-- /div -->
4446
4447 <!-- div -->
4448
4449 ### <a id="_clonewithvalue-customizer"></a>`_.cloneWith(value, [customizer])`
4450 <a href="#_clonewithvalue-customizer">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10395 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.clonewith "See the npm package")
4451
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])*.
4456
4457 #### Since
4458 4.0.0
4459 #### Arguments
4460 1. `value` *(&#42;)*: The value to clone.
4461 2. `[customizer]` *(Function)*: The function to customize cloning.
4462
4463 #### Returns
4464 *(&#42;)*: Returns the cloned value.
4465
4466 #### Example
4467 ```js
4468 function customizer(value) {
4469   if (_.isElement(value)) {
4470     return value.cloneNode(false);
4471   }
4472 }
4473
4474 var el = _.cloneWith(document.body, customizer);
4475
4476 console.log(el === document.body);
4477 // => false
4478 console.log(el.nodeName);
4479 // => 'BODY'
4480 console.log(el.childNodes.length);
4481 // => 0
4482 ```
4483 * * *
4484
4485 <!-- /div -->
4486
4487 <!-- div -->
4488
4489 ### <a id="_eqvalue-other"></a>`_.eq(value, other)`
4490 <a href="#_eqvalue-other">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10485 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.eq "See the npm package")
4491
4492 Performs a
4493 [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
4494 comparison between two values to determine if they are equivalent.
4495
4496 #### Since
4497 4.0.0
4498 #### Arguments
4499 1. `value` *(&#42;)*: The value to compare.
4500 2. `other` *(&#42;)*: The other value to compare.
4501
4502 #### Returns
4503 *(boolean)*: Returns `true` if the values are equivalent, else `false`.
4504
4505 #### Example
4506 ```js
4507 var object = { 'user': 'fred' };
4508 var other = { 'user': 'fred' };
4509
4510 _.eq(object, object);
4511 // => true
4512
4513 _.eq(object, other);
4514 // => false
4515
4516 _.eq('a', 'a');
4517 // => true
4518
4519 _.eq('a', Object('a'));
4520 // => false
4521
4522 _.eq(NaN, NaN);
4523 // => true
4524 ```
4525 * * *
4526
4527 <!-- /div -->
4528
4529 <!-- div -->
4530
4531 ### <a id="_gtvalue-other"></a>`_.gt(value, other)`
4532 <a href="#_gtvalue-other">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10512 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.gt "See the npm package")
4533
4534 Checks if `value` is greater than `other`.
4535
4536 #### Since
4537 3.9.0
4538 #### Arguments
4539 1. `value` *(&#42;)*: The value to compare.
4540 2. `other` *(&#42;)*: The other value to compare.
4541
4542 #### Returns
4543 *(boolean)*: Returns `true` if `value` is greater than `other`, else `false`.
4544
4545 #### Example
4546 ```js
4547 _.gt(3, 1);
4548 // => true
4549
4550 _.gt(3, 3);
4551 // => false
4552
4553 _.gt(1, 3);
4554 // => false
4555 ```
4556 * * *
4557
4558 <!-- /div -->
4559
4560 <!-- div -->
4561
4562 ### <a id="_gtevalue-other"></a>`_.gte(value, other)`
4563 <a href="#_gtevalue-other">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10537 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.gte "See the npm package")
4564
4565 Checks if `value` is greater than or equal to `other`.
4566
4567 #### Since
4568 3.9.0
4569 #### Arguments
4570 1. `value` *(&#42;)*: The value to compare.
4571 2. `other` *(&#42;)*: The other value to compare.
4572
4573 #### Returns
4574 *(boolean)*: Returns `true` if `value` is greater than or equal to `other`, else `false`.
4575
4576 #### Example
4577 ```js
4578 _.gte(3, 1);
4579 // => true
4580
4581 _.gte(3, 3);
4582 // => true
4583
4584 _.gte(1, 3);
4585 // => false
4586 ```
4587 * * *
4588
4589 <!-- /div -->
4590
4591 <!-- div -->
4592
4593 ### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
4594 <a href="#_isargumentsvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10559 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isarguments "See the npm package")
4595
4596 Checks if `value` is likely an `arguments` object.
4597
4598 #### Since
4599 0.1.0
4600 #### Arguments
4601 1. `value` *(&#42;)*: The value to check.
4602
4603 #### Returns
4604 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4605
4606 #### Example
4607 ```js
4608 _.isArguments(function() { return arguments; }());
4609 // => true
4610
4611 _.isArguments([1, 2, 3]);
4612 // => false
4613 ```
4614 * * *
4615
4616 <!-- /div -->
4617
4618 <!-- div -->
4619
4620 ### <a id="_isarrayvalue"></a>`_.isArray(value)`
4621 <a href="#_isarrayvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10590 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isarray "See the npm package")
4622
4623 Checks if `value` is classified as an `Array` object.
4624
4625 #### Since
4626 0.1.0
4627 #### Arguments
4628 1. `value` *(&#42;)*: The value to check.
4629
4630 #### Returns
4631 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4632
4633 #### Example
4634 ```js
4635 _.isArray([1, 2, 3]);
4636 // => true
4637
4638 _.isArray(document.body.children);
4639 // => false
4640
4641 _.isArray('abc');
4642 // => false
4643
4644 _.isArray(_.noop);
4645 // => false
4646 ```
4647 * * *
4648
4649 <!-- /div -->
4650
4651 <!-- div -->
4652
4653 ### <a id="_isarraybuffervalue"></a>`_.isArrayBuffer(value)`
4654 <a href="#_isarraybuffervalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10610 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isarraybuffer "See the npm package")
4655
4656 Checks if `value` is classified as an `ArrayBuffer` object.
4657
4658 #### Since
4659 4.3.0
4660 #### Arguments
4661 1. `value` *(&#42;)*: The value to check.
4662
4663 #### Returns
4664 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4665
4666 #### Example
4667 ```js
4668 _.isArrayBuffer(new ArrayBuffer(2));
4669 // => true
4670
4671 _.isArrayBuffer(new Array(2));
4672 // => false
4673 ```
4674 * * *
4675
4676 <!-- /div -->
4677
4678 <!-- div -->
4679
4680 ### <a id="_isarraylikevalue"></a>`_.isArrayLike(value)`
4681 <a href="#_isarraylikevalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10639 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isarraylike "See the npm package")
4682
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`.
4686
4687 #### Since
4688 4.0.0
4689 #### Arguments
4690 1. `value` *(&#42;)*: The value to check.
4691
4692 #### Returns
4693 *(boolean)*: Returns `true` if `value` is array-like, else `false`.
4694
4695 #### Example
4696 ```js
4697 _.isArrayLike([1, 2, 3]);
4698 // => true
4699
4700 _.isArrayLike(document.body.children);
4701 // => true
4702
4703 _.isArrayLike('abc');
4704 // => true
4705
4706 _.isArrayLike(_.noop);
4707 // => false
4708 ```
4709 * * *
4710
4711 <!-- /div -->
4712
4713 <!-- div -->
4714
4715 ### <a id="_isarraylikeobjectvalue"></a>`_.isArrayLikeObject(value)`
4716 <a href="#_isarraylikeobjectvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10668 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isarraylikeobject "See the npm package")
4717
4718 This method is like `_.isArrayLike` except that it also checks if `value`
4719 is an object.
4720
4721 #### Since
4722 4.0.0
4723 #### Arguments
4724 1. `value` *(&#42;)*: The value to check.
4725
4726 #### Returns
4727 *(boolean)*: Returns `true` if `value` is an array-like object, else `false`.
4728
4729 #### Example
4730 ```js
4731 _.isArrayLikeObject([1, 2, 3]);
4732 // => true
4733
4734 _.isArrayLikeObject(document.body.children);
4735 // => true
4736
4737 _.isArrayLikeObject('abc');
4738 // => false
4739
4740 _.isArrayLikeObject(_.noop);
4741 // => false
4742 ```
4743 * * *
4744
4745 <!-- /div -->
4746
4747 <!-- div -->
4748
4749 ### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
4750 <a href="#_isbooleanvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10690 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isboolean "See the npm package")
4751
4752 Checks if `value` is classified as a boolean primitive or object.
4753
4754 #### Since
4755 0.1.0
4756 #### Arguments
4757 1. `value` *(&#42;)*: The value to check.
4758
4759 #### Returns
4760 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4761
4762 #### Example
4763 ```js
4764 _.isBoolean(false);
4765 // => true
4766
4767 _.isBoolean(null);
4768 // => false
4769 ```
4770 * * *
4771
4772 <!-- /div -->
4773
4774 <!-- div -->
4775
4776 ### <a id="_isbuffervalue"></a>`_.isBuffer(value)`
4777 <a href="#_isbuffervalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10712 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isbuffer "See the npm package")
4778
4779 Checks if `value` is a buffer.
4780
4781 #### Since
4782 4.3.0
4783 #### Arguments
4784 1. `value` *(&#42;)*: The value to check.
4785
4786 #### Returns
4787 *(boolean)*: Returns `true` if `value` is a buffer, else `false`.
4788
4789 #### Example
4790 ```js
4791 _.isBuffer(new Buffer(2));
4792 // => true
4793
4794 _.isBuffer(new Uint8Array(2));
4795 // => false
4796 ```
4797 * * *
4798
4799 <!-- /div -->
4800
4801 <!-- div -->
4802
4803 ### <a id="_isdatevalue"></a>`_.isDate(value)`
4804 <a href="#_isdatevalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10734 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isdate "See the npm package")
4805
4806 Checks if `value` is classified as a `Date` object.
4807
4808 #### Since
4809 0.1.0
4810 #### Arguments
4811 1. `value` *(&#42;)*: The value to check.
4812
4813 #### Returns
4814 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
4815
4816 #### Example
4817 ```js
4818 _.isDate(new Date);
4819 // => true
4820
4821 _.isDate('Mon April 23 2012');
4822 // => false
4823 ```
4824 * * *
4825
4826 <!-- /div -->
4827
4828 <!-- div -->
4829
4830 ### <a id="_iselementvalue"></a>`_.isElement(value)`
4831 <a href="#_iselementvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10756 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.iselement "See the npm package")
4832
4833 Checks if `value` is likely a DOM element.
4834
4835 #### Since
4836 0.1.0
4837 #### Arguments
4838 1. `value` *(&#42;)*: The value to check.
4839
4840 #### Returns
4841 *(boolean)*: Returns `true` if `value` is a DOM element, else `false`.
4842
4843 #### Example
4844 ```js
4845 _.isElement(document.body);
4846 // => true
4847
4848 _.isElement('<body>');
4849 // => false
4850 ```
4851 * * *
4852
4853 <!-- /div -->
4854
4855 <!-- div -->
4856
4857 ### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
4858 <a href="#_isemptyvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10793 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isempty "See the npm package")
4859
4860 Checks if `value` is an empty object, collection, map, or set.
4861 <br>
4862 <br>
4863 Objects are considered empty if they have no own enumerable string keyed
4864 properties.
4865 <br>
4866 <br>
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`.
4870
4871 #### Since
4872 0.1.0
4873 #### Arguments
4874 1. `value` *(&#42;)*: The value to check.
4875
4876 #### Returns
4877 *(boolean)*: Returns `true` if `value` is empty, else `false`.
4878
4879 #### Example
4880 ```js
4881 _.isEmpty(null);
4882 // => true
4883
4884 _.isEmpty(true);
4885 // => true
4886
4887 _.isEmpty(1);
4888 // => true
4889
4890 _.isEmpty([1, 2, 3]);
4891 // => false
4892
4893 _.isEmpty({ 'a': 1 });
4894 // => false
4895 ```
4896 * * *
4897
4898 <!-- /div -->
4899
4900 <!-- div -->
4901
4902 ### <a id="_isequalvalue-other"></a>`_.isEqual(value, other)`
4903 <a href="#_isequalvalue-other">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10842 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isequal "See the npm package")
4904
4905 Performs a deep comparison between two values to determine if they are
4906 equivalent.
4907 <br>
4908 <br>
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.
4914
4915 #### Since
4916 0.1.0
4917 #### Arguments
4918 1. `value` *(&#42;)*: The value to compare.
4919 2. `other` *(&#42;)*: The other value to compare.
4920
4921 #### Returns
4922 *(boolean)*: Returns `true` if the values are equivalent, else `false`.
4923
4924 #### Example
4925 ```js
4926 var object = { 'user': 'fred' };
4927 var other = { 'user': 'fred' };
4928
4929 _.isEqual(object, other);
4930 // => true
4931
4932 object === other;
4933 // => false
4934 ```
4935 * * *
4936
4937 <!-- /div -->
4938
4939 <!-- div -->
4940
4941 ### <a id="_isequalwithvalue-other-customizer"></a>`_.isEqualWith(value, other, [customizer])`
4942 <a href="#_isequalwithvalue-other-customizer">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10879 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isequalwith "See the npm package")
4943
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])*.
4948
4949 #### Since
4950 4.0.0
4951 #### Arguments
4952 1. `value` *(&#42;)*: The value to compare.
4953 2. `other` *(&#42;)*: The other value to compare.
4954 3. `[customizer]` *(Function)*: The function to customize comparisons.
4955
4956 #### Returns
4957 *(boolean)*: Returns `true` if the values are equivalent, else `false`.
4958
4959 #### Example
4960 ```js
4961 function isGreeting(value) {
4962   return /^h(?:i|ello)$/.test(value);
4963 }
4964
4965 function customizer(objValue, othValue) {
4966   if (isGreeting(objValue) && isGreeting(othValue)) {
4967     return true;
4968   }
4969 }
4970
4971 var array = ['hello', 'goodbye'];
4972 var other = ['hi', 'goodbye'];
4973
4974 _.isEqualWith(array, other, customizer);
4975 // => true
4976 ```
4977 * * *
4978
4979 <!-- /div -->
4980
4981 <!-- div -->
4982
4983 ### <a id="_iserrorvalue"></a>`_.isError(value)`
4984 <a href="#_iserrorvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10904 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.iserror "See the npm package")
4985
4986 Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
4987 `SyntaxError`, `TypeError`, or `URIError` object.
4988
4989 #### Since
4990 3.0.0
4991 #### Arguments
4992 1. `value` *(&#42;)*: The value to check.
4993
4994 #### Returns
4995 *(boolean)*: Returns `true` if `value` is an error object, else `false`.
4996
4997 #### Example
4998 ```js
4999 _.isError(new Error);
5000 // => true
5001
5002 _.isError(Error);
5003 // => false
5004 ```
5005 * * *
5006
5007 <!-- /div -->
5008
5009 <!-- div -->
5010
5011 ### <a id="_isfinitevalue"></a>`_.isFinite(value)`
5012 <a href="#_isfinitevalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10939 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isfinite "See the npm package")
5013
5014 Checks if `value` is a finite primitive number.
5015 <br>
5016 <br>
5017 **Note:** This method is based on
5018 [`Number.isFinite`](https://mdn.io/Number/isFinite).
5019
5020 #### Since
5021 0.1.0
5022 #### Arguments
5023 1. `value` *(&#42;)*: The value to check.
5024
5025 #### Returns
5026 *(boolean)*: Returns `true` if `value` is a finite number, else `false`.
5027
5028 #### Example
5029 ```js
5030 _.isFinite(3);
5031 // => true
5032
5033 _.isFinite(Number.MIN_VALUE);
5034 // => true
5035
5036 _.isFinite(Infinity);
5037 // => false
5038
5039 _.isFinite('3');
5040 // => false
5041 ```
5042 * * *
5043
5044 <!-- /div -->
5045
5046 <!-- div -->
5047
5048 ### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
5049 <a href="#_isfunctionvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10961 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isfunction "See the npm package")
5050
5051 Checks if `value` is classified as a `Function` object.
5052
5053 #### Since
5054 0.1.0
5055 #### Arguments
5056 1. `value` *(&#42;)*: The value to check.
5057
5058 #### Returns
5059 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5060
5061 #### Example
5062 ```js
5063 _.isFunction(_);
5064 // => true
5065
5066 _.isFunction(/abc/);
5067 // => false
5068 ```
5069 * * *
5070
5071 <!-- /div -->
5072
5073 <!-- div -->
5074
5075 ### <a id="_isintegervalue"></a>`_.isInteger(value)`
5076 <a href="#_isintegervalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10995 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isinteger "See the npm package")
5077
5078 Checks if `value` is an integer.
5079 <br>
5080 <br>
5081 **Note:** This method is based on
5082 [`Number.isInteger`](https://mdn.io/Number/isInteger).
5083
5084 #### Since
5085 4.0.0
5086 #### Arguments
5087 1. `value` *(&#42;)*: The value to check.
5088
5089 #### Returns
5090 *(boolean)*: Returns `true` if `value` is an integer, else `false`.
5091
5092 #### Example
5093 ```js
5094 _.isInteger(3);
5095 // => true
5096
5097 _.isInteger(Number.MIN_VALUE);
5098 // => false
5099
5100 _.isInteger(Infinity);
5101 // => false
5102
5103 _.isInteger('3');
5104 // => false
5105 ```
5106 * * *
5107
5108 <!-- /div -->
5109
5110 <!-- div -->
5111
5112 ### <a id="_islengthvalue"></a>`_.isLength(value)`
5113 <a href="#_islengthvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11026 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.islength "See the npm package")
5114
5115 Checks if `value` is a valid array-like length.
5116 <br>
5117 <br>
5118 **Note:** This function is loosely based on
5119 [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
5120
5121 #### Since
5122 4.0.0
5123 #### Arguments
5124 1. `value` *(&#42;)*: The value to check.
5125
5126 #### Returns
5127 *(boolean)*: Returns `true` if `value` is a valid length, else `false`.
5128
5129 #### Example
5130 ```js
5131 _.isLength(3);
5132 // => true
5133
5134 _.isLength(Number.MIN_VALUE);
5135 // => false
5136
5137 _.isLength(Infinity);
5138 // => false
5139
5140 _.isLength('3');
5141 // => false
5142 ```
5143 * * *
5144
5145 <!-- /div -->
5146
5147 <!-- div -->
5148
5149 ### <a id="_ismapvalue"></a>`_.isMap(value)`
5150 <a href="#_ismapvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11107 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.ismap "See the npm package")
5151
5152 Checks if `value` is classified as a `Map` object.
5153
5154 #### Since
5155 4.3.0
5156 #### Arguments
5157 1. `value` *(&#42;)*: The value to check.
5158
5159 #### Returns
5160 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5161
5162 #### Example
5163 ```js
5164 _.isMap(new Map);
5165 // => true
5166
5167 _.isMap(new WeakMap);
5168 // => false
5169 ```
5170 * * *
5171
5172 <!-- /div -->
5173
5174 <!-- div -->
5175
5176 ### <a id="_ismatchobject-source"></a>`_.isMatch(object, source)`
5177 <a href="#_ismatchobject-source">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11135 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.ismatch "See the npm package")
5178
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.
5182 <br>
5183 <br>
5184 **Note:** This method supports comparing the same values as `_.isEqual`.
5185
5186 #### Since
5187 3.0.0
5188 #### Arguments
5189 1. `object` *(Object)*: The object to inspect.
5190 2. `source` *(Object)*: The object of property values to match.
5191
5192 #### Returns
5193 *(boolean)*: Returns `true` if `object` is a match, else `false`.
5194
5195 #### Example
5196 ```js
5197 var object = { 'user': 'fred', 'age': 40 };
5198
5199 _.isMatch(object, { 'age': 40 });
5200 // => true
5201
5202 _.isMatch(object, { 'age': 36 });
5203 // => false
5204 ```
5205 * * *
5206
5207 <!-- /div -->
5208
5209 <!-- div -->
5210
5211 ### <a id="_ismatchwithobject-source-customizer"></a>`_.isMatchWith(object, source, [customizer])`
5212 <a href="#_ismatchwithobject-source-customizer">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11171 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.ismatchwith "See the npm package")
5213
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)*.
5218
5219 #### Since
5220 4.0.0
5221 #### Arguments
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.
5225
5226 #### Returns
5227 *(boolean)*: Returns `true` if `object` is a match, else `false`.
5228
5229 #### Example
5230 ```js
5231 function isGreeting(value) {
5232   return /^h(?:i|ello)$/.test(value);
5233 }
5234
5235 function customizer(objValue, srcValue) {
5236   if (isGreeting(objValue) && isGreeting(srcValue)) {
5237     return true;
5238   }
5239 }
5240
5241 var object = { 'greeting': 'hello' };
5242 var source = { 'greeting': 'hi' };
5243
5244 _.isMatchWith(object, source, customizer);
5245 // => true
5246 ```
5247 * * *
5248
5249 <!-- /div -->
5250
5251 <!-- div -->
5252
5253 ### <a id="_isnanvalue"></a>`_.isNaN(value)`
5254 <a href="#_isnanvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11204 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isnan "See the npm package")
5255
5256 Checks if `value` is `NaN`.
5257 <br>
5258 <br>
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.
5263
5264 #### Since
5265 0.1.0
5266 #### Arguments
5267 1. `value` *(&#42;)*: The value to check.
5268
5269 #### Returns
5270 *(boolean)*: Returns `true` if `value` is `NaN`, else `false`.
5271
5272 #### Example
5273 ```js
5274 _.isNaN(NaN);
5275 // => true
5276
5277 _.isNaN(new Number(NaN));
5278 // => true
5279
5280 isNaN(undefined);
5281 // => true
5282
5283 _.isNaN(undefined);
5284 // => false
5285 ```
5286 * * *
5287
5288 <!-- /div -->
5289
5290 <!-- div -->
5291
5292 ### <a id="_isnativevalue"></a>`_.isNative(value)`
5293 <a href="#_isnativevalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11237 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isnative "See the npm package")
5294
5295 Checks if `value` is a pristine native function.
5296 <br>
5297 <br>
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`.
5305
5306 #### Since
5307 3.0.0
5308 #### Arguments
5309 1. `value` *(&#42;)*: The value to check.
5310
5311 #### Returns
5312 *(boolean)*: Returns `true` if `value` is a native function, else `false`.
5313
5314 #### Example
5315 ```js
5316 _.isNative(Array.prototype.push);
5317 // => true
5318
5319 _.isNative(_);
5320 // => false
5321 ```
5322 * * *
5323
5324 <!-- /div -->
5325
5326 <!-- div -->
5327
5328 ### <a id="_isnilvalue"></a>`_.isNil(value)`
5329 <a href="#_isnilvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11285 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isnil "See the npm package")
5330
5331 Checks if `value` is `null` or `undefined`.
5332
5333 #### Since
5334 4.0.0
5335 #### Arguments
5336 1. `value` *(&#42;)*: The value to check.
5337
5338 #### Returns
5339 *(boolean)*: Returns `true` if `value` is nullish, else `false`.
5340
5341 #### Example
5342 ```js
5343 _.isNil(null);
5344 // => true
5345
5346 _.isNil(void 0);
5347 // => true
5348
5349 _.isNil(NaN);
5350 // => false
5351 ```
5352 * * *
5353
5354 <!-- /div -->
5355
5356 <!-- div -->
5357
5358 ### <a id="_isnullvalue"></a>`_.isNull(value)`
5359 <a href="#_isnullvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11261 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isnull "See the npm package")
5360
5361 Checks if `value` is `null`.
5362
5363 #### Since
5364 0.1.0
5365 #### Arguments
5366 1. `value` *(&#42;)*: The value to check.
5367
5368 #### Returns
5369 *(boolean)*: Returns `true` if `value` is `null`, else `false`.
5370
5371 #### Example
5372 ```js
5373 _.isNull(null);
5374 // => true
5375
5376 _.isNull(void 0);
5377 // => false
5378 ```
5379 * * *
5380
5381 <!-- /div -->
5382
5383 <!-- div -->
5384
5385 ### <a id="_isnumbervalue"></a>`_.isNumber(value)`
5386 <a href="#_isnumbervalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11316 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isnumber "See the npm package")
5387
5388 Checks if `value` is classified as a `Number` primitive or object.
5389 <br>
5390 <br>
5391 **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
5392 classified as numbers, use the `_.isFinite` method.
5393
5394 #### Since
5395 0.1.0
5396 #### Arguments
5397 1. `value` *(&#42;)*: The value to check.
5398
5399 #### Returns
5400 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5401
5402 #### Example
5403 ```js
5404 _.isNumber(3);
5405 // => true
5406
5407 _.isNumber(Number.MIN_VALUE);
5408 // => true
5409
5410 _.isNumber(Infinity);
5411 // => true
5412
5413 _.isNumber('3');
5414 // => false
5415 ```
5416 * * *
5417
5418 <!-- /div -->
5419
5420 <!-- div -->
5421
5422 ### <a id="_isobjectvalue"></a>`_.isObject(value)`
5423 <a href="#_isobjectvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11056 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isobject "See the npm package")
5424
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('')`)*
5428
5429 #### Since
5430 0.1.0
5431 #### Arguments
5432 1. `value` *(&#42;)*: The value to check.
5433
5434 #### Returns
5435 *(boolean)*: Returns `true` if `value` is an object, else `false`.
5436
5437 #### Example
5438 ```js
5439 _.isObject({});
5440 // => true
5441
5442 _.isObject([1, 2, 3]);
5443 // => true
5444
5445 _.isObject(_.noop);
5446 // => true
5447
5448 _.isObject(null);
5449 // => false
5450 ```
5451 * * *
5452
5453 <!-- /div -->
5454
5455 <!-- div -->
5456
5457 ### <a id="_isobjectlikevalue"></a>`_.isObjectLike(value)`
5458 <a href="#_isobjectlikevalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11085 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isobjectlike "See the npm package")
5459
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".
5462
5463 #### Since
5464 4.0.0
5465 #### Arguments
5466 1. `value` *(&#42;)*: The value to check.
5467
5468 #### Returns
5469 *(boolean)*: Returns `true` if `value` is object-like, else `false`.
5470
5471 #### Example
5472 ```js
5473 _.isObjectLike({});
5474 // => true
5475
5476 _.isObjectLike([1, 2, 3]);
5477 // => true
5478
5479 _.isObjectLike(_.noop);
5480 // => false
5481
5482 _.isObjectLike(null);
5483 // => false
5484 ```
5485 * * *
5486
5487 <!-- /div -->
5488
5489 <!-- div -->
5490
5491 ### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
5492 <a href="#_isplainobjectvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11350 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isplainobject "See the npm package")
5493
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`.
5496
5497 #### Since
5498 0.8.0
5499 #### Arguments
5500 1. `value` *(&#42;)*: The value to check.
5501
5502 #### Returns
5503 *(boolean)*: Returns `true` if `value` is a plain object, else `false`.
5504
5505 #### Example
5506 ```js
5507 function Foo() {
5508   this.a = 1;
5509 }
5510
5511 _.isPlainObject(new Foo);
5512 // => false
5513
5514 _.isPlainObject([1, 2, 3]);
5515 // => false
5516
5517 _.isPlainObject({ 'x': 0, 'y': 0 });
5518 // => true
5519
5520 _.isPlainObject(Object.create(null));
5521 // => true
5522 ```
5523 * * *
5524
5525 <!-- /div -->
5526
5527 <!-- div -->
5528
5529 ### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
5530 <a href="#_isregexpvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11382 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isregexp "See the npm package")
5531
5532 Checks if `value` is classified as a `RegExp` object.
5533
5534 #### Since
5535 0.1.0
5536 #### Arguments
5537 1. `value` *(&#42;)*: The value to check.
5538
5539 #### Returns
5540 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5541
5542 #### Example
5543 ```js
5544 _.isRegExp(/abc/);
5545 // => true
5546
5547 _.isRegExp('/abc/');
5548 // => false
5549 ```
5550 * * *
5551
5552 <!-- /div -->
5553
5554 <!-- div -->
5555
5556 ### <a id="_issafeintegervalue"></a>`_.isSafeInteger(value)`
5557 <a href="#_issafeintegervalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11414 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.issafeinteger "See the npm package")
5558
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.
5561 <br>
5562 <br>
5563 **Note:** This method is based on
5564 [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
5565
5566 #### Since
5567 4.0.0
5568 #### Arguments
5569 1. `value` *(&#42;)*: The value to check.
5570
5571 #### Returns
5572 *(boolean)*: Returns `true` if `value` is a safe integer, else `false`.
5573
5574 #### Example
5575 ```js
5576 _.isSafeInteger(3);
5577 // => true
5578
5579 _.isSafeInteger(Number.MIN_VALUE);
5580 // => false
5581
5582 _.isSafeInteger(Infinity);
5583 // => false
5584
5585 _.isSafeInteger('3');
5586 // => false
5587 ```
5588 * * *
5589
5590 <!-- /div -->
5591
5592 <!-- div -->
5593
5594 ### <a id="_issetvalue"></a>`_.isSet(value)`
5595 <a href="#_issetvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11436 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isset "See the npm package")
5596
5597 Checks if `value` is classified as a `Set` object.
5598
5599 #### Since
5600 4.3.0
5601 #### Arguments
5602 1. `value` *(&#42;)*: The value to check.
5603
5604 #### Returns
5605 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5606
5607 #### Example
5608 ```js
5609 _.isSet(new Set);
5610 // => true
5611
5612 _.isSet(new WeakSet);
5613 // => false
5614 ```
5615 * * *
5616
5617 <!-- /div -->
5618
5619 <!-- div -->
5620
5621 ### <a id="_isstringvalue"></a>`_.isString(value)`
5622 <a href="#_isstringvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11458 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isstring "See the npm package")
5623
5624 Checks if `value` is classified as a `String` primitive or object.
5625
5626 #### Since
5627 0.1.0
5628 #### Arguments
5629 1. `value` *(&#42;)*: The value to check.
5630
5631 #### Returns
5632 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5633
5634 #### Example
5635 ```js
5636 _.isString('abc');
5637 // => true
5638
5639 _.isString(1);
5640 // => false
5641 ```
5642 * * *
5643
5644 <!-- /div -->
5645
5646 <!-- div -->
5647
5648 ### <a id="_issymbolvalue"></a>`_.isSymbol(value)`
5649 <a href="#_issymbolvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11481 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.issymbol "See the npm package")
5650
5651 Checks if `value` is classified as a `Symbol` primitive or object.
5652
5653 #### Since
5654 4.0.0
5655 #### Arguments
5656 1. `value` *(&#42;)*: The value to check.
5657
5658 #### Returns
5659 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5660
5661 #### Example
5662 ```js
5663 _.isSymbol(Symbol.iterator);
5664 // => true
5665
5666 _.isSymbol('abc');
5667 // => false
5668 ```
5669 * * *
5670
5671 <!-- /div -->
5672
5673 <!-- div -->
5674
5675 ### <a id="_istypedarrayvalue"></a>`_.isTypedArray(value)`
5676 <a href="#_istypedarrayvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11504 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.istypedarray "See the npm package")
5677
5678 Checks if `value` is classified as a typed array.
5679
5680 #### Since
5681 3.0.0
5682 #### Arguments
5683 1. `value` *(&#42;)*: The value to check.
5684
5685 #### Returns
5686 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5687
5688 #### Example
5689 ```js
5690 _.isTypedArray(new Uint8Array);
5691 // => true
5692
5693 _.isTypedArray([]);
5694 // => false
5695 ```
5696 * * *
5697
5698 <!-- /div -->
5699
5700 <!-- div -->
5701
5702 ### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
5703 <a href="#_isundefinedvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11526 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isundefined "See the npm package")
5704
5705 Checks if `value` is `undefined`.
5706
5707 #### Since
5708 0.1.0
5709 #### Arguments
5710 1. `value` *(&#42;)*: The value to check.
5711
5712 #### Returns
5713 *(boolean)*: Returns `true` if `value` is `undefined`, else `false`.
5714
5715 #### Example
5716 ```js
5717 _.isUndefined(void 0);
5718 // => true
5719
5720 _.isUndefined(null);
5721 // => false
5722 ```
5723 * * *
5724
5725 <!-- /div -->
5726
5727 <!-- div -->
5728
5729 ### <a id="_isweakmapvalue"></a>`_.isWeakMap(value)`
5730 <a href="#_isweakmapvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11548 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isweakmap "See the npm package")
5731
5732 Checks if `value` is classified as a `WeakMap` object.
5733
5734 #### Since
5735 4.3.0
5736 #### Arguments
5737 1. `value` *(&#42;)*: The value to check.
5738
5739 #### Returns
5740 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5741
5742 #### Example
5743 ```js
5744 _.isWeakMap(new WeakMap);
5745 // => true
5746
5747 _.isWeakMap(new Map);
5748 // => false
5749 ```
5750 * * *
5751
5752 <!-- /div -->
5753
5754 <!-- div -->
5755
5756 ### <a id="_isweaksetvalue"></a>`_.isWeakSet(value)`
5757 <a href="#_isweaksetvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11570 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.isweakset "See the npm package")
5758
5759 Checks if `value` is classified as a `WeakSet` object.
5760
5761 #### Since
5762 4.3.0
5763 #### Arguments
5764 1. `value` *(&#42;)*: The value to check.
5765
5766 #### Returns
5767 *(boolean)*: Returns `true` if `value` is correctly classified, else `false`.
5768
5769 #### Example
5770 ```js
5771 _.isWeakSet(new WeakSet);
5772 // => true
5773
5774 _.isWeakSet(new Set);
5775 // => false
5776 ```
5777 * * *
5778
5779 <!-- /div -->
5780
5781 <!-- div -->
5782
5783 ### <a id="_ltvalue-other"></a>`_.lt(value, other)`
5784 <a href="#_ltvalue-other">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11597 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.lt "See the npm package")
5785
5786 Checks if `value` is less than `other`.
5787
5788 #### Since
5789 3.9.0
5790 #### Arguments
5791 1. `value` *(&#42;)*: The value to compare.
5792 2. `other` *(&#42;)*: The other value to compare.
5793
5794 #### Returns
5795 *(boolean)*: Returns `true` if `value` is less than `other`, else `false`.
5796
5797 #### Example
5798 ```js
5799 _.lt(1, 3);
5800 // => true
5801
5802 _.lt(3, 3);
5803 // => false
5804
5805 _.lt(3, 1);
5806 // => false
5807 ```
5808 * * *
5809
5810 <!-- /div -->
5811
5812 <!-- div -->
5813
5814 ### <a id="_ltevalue-other"></a>`_.lte(value, other)`
5815 <a href="#_ltevalue-other">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11622 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.lte "See the npm package")
5816
5817 Checks if `value` is less than or equal to `other`.
5818
5819 #### Since
5820 3.9.0
5821 #### Arguments
5822 1. `value` *(&#42;)*: The value to compare.
5823 2. `other` *(&#42;)*: The other value to compare.
5824
5825 #### Returns
5826 *(boolean)*: Returns `true` if `value` is less than or equal to `other`, else `false`.
5827
5828 #### Example
5829 ```js
5830 _.lte(1, 3);
5831 // => true
5832
5833 _.lte(3, 3);
5834 // => true
5835
5836 _.lte(3, 1);
5837 // => false
5838 ```
5839 * * *
5840
5841 <!-- /div -->
5842
5843 <!-- div -->
5844
5845 ### <a id="_toarrayvalue"></a>`_.toArray(value)`
5846 <a href="#_toarrayvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11649 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.toarray "See the npm package")
5847
5848 Converts `value` to an array.
5849
5850 #### Since
5851 0.1.0
5852 #### Arguments
5853 1. `value` *(&#42;)*: The value to convert.
5854
5855 #### Returns
5856 *(Array)*: Returns the converted array.
5857
5858 #### Example
5859 ```js
5860 _.toArray({ 'a': 1, 'b': 2 });
5861 // => [1, 2]
5862
5863 _.toArray('abc');
5864 // => ['a', 'b', 'c']
5865
5866 _.toArray(1);
5867 // => []
5868
5869 _.toArray(null);
5870 // => []
5871 ```
5872 * * *
5873
5874 <!-- /div -->
5875
5876 <!-- div -->
5877
5878 ### <a id="_tofinitevalue"></a>`_.toFinite(value)`
5879 <a href="#_tofinitevalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11688 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.tofinite "See the npm package")
5880
5881 Converts `value` to a finite number.
5882
5883 #### Since
5884 4.12.0
5885 #### Arguments
5886 1. `value` *(&#42;)*: The value to convert.
5887
5888 #### Returns
5889 *(number)*: Returns the converted number.
5890
5891 #### Example
5892 ```js
5893 _.toFinite(3.2);
5894 // => 3.2
5895
5896 _.toFinite(Number.MIN_VALUE);
5897 // => 5e-324
5898
5899 _.toFinite(Infinity);
5900 // => 1.7976931348623157e+308
5901
5902 _.toFinite('3.2');
5903 // => 3.2
5904 ```
5905 * * *
5906
5907 <!-- /div -->
5908
5909 <!-- div -->
5910
5911 ### <a id="_tointegervalue"></a>`_.toInteger(value)`
5912 <a href="#_tointegervalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11726 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.tointeger "See the npm package")
5913
5914 Converts `value` to an integer.
5915 <br>
5916 <br>
5917 **Note:** This method is loosely based on
5918 [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
5919
5920 #### Since
5921 4.0.0
5922 #### Arguments
5923 1. `value` *(&#42;)*: The value to convert.
5924
5925 #### Returns
5926 *(number)*: Returns the converted integer.
5927
5928 #### Example
5929 ```js
5930 _.toInteger(3.2);
5931 // => 3
5932
5933 _.toInteger(Number.MIN_VALUE);
5934 // => 0
5935
5936 _.toInteger(Infinity);
5937 // => 1.7976931348623157e+308
5938
5939 _.toInteger('3.2');
5940 // => 3
5941 ```
5942 * * *
5943
5944 <!-- /div -->
5945
5946 <!-- div -->
5947
5948 ### <a id="_tolengthvalue"></a>`_.toLength(value)`
5949 <a href="#_tolengthvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11760 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.tolength "See the npm package")
5950
5951 Converts `value` to an integer suitable for use as the length of an
5952 array-like object.
5953 <br>
5954 <br>
5955 **Note:** This method is based on
5956 [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
5957
5958 #### Since
5959 4.0.0
5960 #### Arguments
5961 1. `value` *(&#42;)*: The value to convert.
5962
5963 #### Returns
5964 *(number)*: Returns the converted integer.
5965
5966 #### Example
5967 ```js
5968 _.toLength(3.2);
5969 // => 3
5970
5971 _.toLength(Number.MIN_VALUE);
5972 // => 0
5973
5974 _.toLength(Infinity);
5975 // => 4294967295
5976
5977 _.toLength('3.2');
5978 // => 3
5979 ```
5980 * * *
5981
5982 <!-- /div -->
5983
5984 <!-- div -->
5985
5986 ### <a id="_tonumbervalue"></a>`_.toNumber(value)`
5987 <a href="#_tonumbervalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11787 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.tonumber "See the npm package")
5988
5989 Converts `value` to a number.
5990
5991 #### Since
5992 4.0.0
5993 #### Arguments
5994 1. `value` *(&#42;)*: The value to process.
5995
5996 #### Returns
5997 *(number)*: Returns the number.
5998
5999 #### Example
6000 ```js
6001 _.toNumber(3.2);
6002 // => 3.2
6003
6004 _.toNumber(Number.MIN_VALUE);
6005 // => 5e-324
6006
6007 _.toNumber(Infinity);
6008 // => Infinity
6009
6010 _.toNumber('3.2');
6011 // => 3.2
6012 ```
6013 * * *
6014
6015 <!-- /div -->
6016
6017 <!-- div -->
6018
6019 ### <a id="_toplainobjectvalue"></a>`_.toPlainObject(value)`
6020 <a href="#_toplainobjectvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11832 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.toplainobject "See the npm package")
6021
6022 Converts `value` to a plain object flattening inherited enumerable string
6023 keyed properties of `value` to own properties of the plain object.
6024
6025 #### Since
6026 3.0.0
6027 #### Arguments
6028 1. `value` *(&#42;)*: The value to convert.
6029
6030 #### Returns
6031 *(Object)*: Returns the converted plain object.
6032
6033 #### Example
6034 ```js
6035 function Foo() {
6036   this.b = 2;
6037 }
6038
6039 Foo.prototype.c = 3;
6040
6041 _.assign({ 'a': 1 }, new Foo);
6042 // => { 'a': 1, 'b': 2 }
6043
6044 _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
6045 // => { 'a': 1, 'b': 2, 'c': 3 }
6046 ```
6047 * * *
6048
6049 <!-- /div -->
6050
6051 <!-- div -->
6052
6053 ### <a id="_tosafeintegervalue"></a>`_.toSafeInteger(value)`
6054 <a href="#_tosafeintegervalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11860 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.tosafeinteger "See the npm package")
6055
6056 Converts `value` to a safe integer. A safe integer can be compared and
6057 represented correctly.
6058
6059 #### Since
6060 4.0.0
6061 #### Arguments
6062 1. `value` *(&#42;)*: The value to convert.
6063
6064 #### Returns
6065 *(number)*: Returns the converted integer.
6066
6067 #### Example
6068 ```js
6069 _.toSafeInteger(3.2);
6070 // => 3
6071
6072 _.toSafeInteger(Number.MIN_VALUE);
6073 // => 0
6074
6075 _.toSafeInteger(Infinity);
6076 // => 9007199254740991
6077
6078 _.toSafeInteger('3.2');
6079 // => 3
6080 ```
6081 * * *
6082
6083 <!-- /div -->
6084
6085 <!-- div -->
6086
6087 ### <a id="_tostringvalue"></a>`_.toString(value)`
6088 <a href="#_tostringvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11885 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.tostring "See the npm package")
6089
6090 Converts `value` to a string. An empty string is returned for `null`
6091 and `undefined` values. The sign of `-0` is preserved.
6092
6093 #### Since
6094 4.0.0
6095 #### Arguments
6096 1. `value` *(&#42;)*: The value to process.
6097
6098 #### Returns
6099 *(string)*: Returns the string.
6100
6101 #### Example
6102 ```js
6103 _.toString(null);
6104 // => ''
6105
6106 _.toString(-0);
6107 // => '-0'
6108
6109 _.toString([1, 2, 3]);
6110 // => '1,2,3'
6111 ```
6112 * * *
6113
6114 <!-- /div -->
6115
6116 <!-- /div -->
6117
6118 <!-- div -->
6119
6120 ## `“Math” Methods`
6121
6122 <!-- div -->
6123
6124 ### <a id="_addaugend-addend"></a>`_.add(augend, addend)`
6125 <a href="#_addaugend-addend">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15481 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.add "See the npm package")
6126
6127 Adds two numbers.
6128
6129 #### Since
6130 3.4.0
6131 #### Arguments
6132 1. `augend` *(number)*: The first number in an addition.
6133 2. `addend` *(number)*: The second number in an addition.
6134
6135 #### Returns
6136 *(number)*: Returns the total.
6137
6138 #### Example
6139 ```js
6140 _.add(6, 4);
6141 // => 10
6142 ```
6143 * * *
6144
6145 <!-- /div -->
6146
6147 <!-- div -->
6148
6149 ### <a id="_ceilnumber-precision0"></a>`_.ceil(number, [precision=0])`
6150 <a href="#_ceilnumber-precision0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15506 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.ceil "See the npm package")
6151
6152 Computes `number` rounded up to `precision`.
6153
6154 #### Since
6155 3.10.0
6156 #### Arguments
6157 1. `number` *(number)*: The number to round up.
6158 2. `[precision=0]` *(number)*: The precision to round up to.
6159
6160 #### Returns
6161 *(number)*: Returns the rounded up number.
6162
6163 #### Example
6164 ```js
6165 _.ceil(4.006);
6166 // => 5
6167
6168 _.ceil(6.004, 2);
6169 // => 6.01
6170
6171 _.ceil(6040, -2);
6172 // => 6100
6173 ```
6174 * * *
6175
6176 <!-- /div -->
6177
6178 <!-- div -->
6179
6180 ### <a id="_dividedividend-divisor"></a>`_.divide(dividend, divisor)`
6181 <a href="#_dividedividend-divisor">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15523 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.divide "See the npm package")
6182
6183 Divide two numbers.
6184
6185 #### Since
6186 4.7.0
6187 #### Arguments
6188 1. `dividend` *(number)*: The first number in a division.
6189 2. `divisor` *(number)*: The second number in a division.
6190
6191 #### Returns
6192 *(number)*: Returns the quotient.
6193
6194 #### Example
6195 ```js
6196 _.divide(6, 4);
6197 // => 1.5
6198 ```
6199 * * *
6200
6201 <!-- /div -->
6202
6203 <!-- div -->
6204
6205 ### <a id="_floornumber-precision0"></a>`_.floor(number, [precision=0])`
6206 <a href="#_floornumber-precision0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15548 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.floor "See the npm package")
6207
6208 Computes `number` rounded down to `precision`.
6209
6210 #### Since
6211 3.10.0
6212 #### Arguments
6213 1. `number` *(number)*: The number to round down.
6214 2. `[precision=0]` *(number)*: The precision to round down to.
6215
6216 #### Returns
6217 *(number)*: Returns the rounded down number.
6218
6219 #### Example
6220 ```js
6221 _.floor(4.006);
6222 // => 4
6223
6224 _.floor(0.046, 2);
6225 // => 0.04
6226
6227 _.floor(4060, -2);
6228 // => 4000
6229 ```
6230 * * *
6231
6232 <!-- /div -->
6233
6234 <!-- div -->
6235
6236 ### <a id="_maxarray"></a>`_.max(array)`
6237 <a href="#_maxarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15568 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.max "See the npm package")
6238
6239 Computes the maximum value of `array`. If `array` is empty or falsey,
6240 `undefined` is returned.
6241
6242 #### Since
6243 0.1.0
6244 #### Arguments
6245 1. `array` *(Array)*: The array to iterate over.
6246
6247 #### Returns
6248 *(&#42;)*: Returns the maximum value.
6249
6250 #### Example
6251 ```js
6252 _.max([4, 2, 8, 6]);
6253 // => 8
6254
6255 _.max([]);
6256 // => undefined
6257 ```
6258 * * *
6259
6260 <!-- /div -->
6261
6262 <!-- div -->
6263
6264 ### <a id="_maxbyarray-iteratee_identity"></a>`_.maxBy(array, [iteratee=_.identity])`
6265 <a href="#_maxbyarray-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15598 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.maxby "See the npm package")
6266
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)*.
6270
6271 #### Since
6272 4.0.0
6273 #### Arguments
6274 1. `array` *(Array)*: The array to iterate over.
6275 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
6276
6277 #### Returns
6278 *(&#42;)*: Returns the maximum value.
6279
6280 #### Example
6281 ```js
6282 var objects = [{ 'n': 1 }, { 'n': 2 }];
6283
6284 _.maxBy(objects, function(o) { return o.n; });
6285 // => { 'n': 2 }
6286
6287 // The `_.property` iteratee shorthand.
6288 _.maxBy(objects, 'n');
6289 // => { 'n': 2 }
6290 ```
6291 * * *
6292
6293 <!-- /div -->
6294
6295 <!-- div -->
6296
6297 ### <a id="_meanarray"></a>`_.mean(array)`
6298 <a href="#_meanarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15618 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.mean "See the npm package")
6299
6300 Computes the mean of the values in `array`.
6301
6302 #### Since
6303 4.0.0
6304 #### Arguments
6305 1. `array` *(Array)*: The array to iterate over.
6306
6307 #### Returns
6308 *(number)*: Returns the mean.
6309
6310 #### Example
6311 ```js
6312 _.mean([4, 2, 8, 6]);
6313 // => 5
6314 ```
6315 * * *
6316
6317 <!-- /div -->
6318
6319 <!-- div -->
6320
6321 ### <a id="_meanbyarray-iteratee_identity"></a>`_.meanBy(array, [iteratee=_.identity])`
6322 <a href="#_meanbyarray-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15646 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.meanby "See the npm package")
6323
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)*.
6327
6328 #### Since
6329 4.7.0
6330 #### Arguments
6331 1. `array` *(Array)*: The array to iterate over.
6332 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
6333
6334 #### Returns
6335 *(number)*: Returns the mean.
6336
6337 #### Example
6338 ```js
6339 var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
6340
6341 _.meanBy(objects, function(o) { return o.n; });
6342 // => 5
6343
6344 // The `_.property` iteratee shorthand.
6345 _.meanBy(objects, 'n');
6346 // => 5
6347 ```
6348 * * *
6349
6350 <!-- /div -->
6351
6352 <!-- div -->
6353
6354 ### <a id="_minarray"></a>`_.min(array)`
6355 <a href="#_minarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15668 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.min "See the npm package")
6356
6357 Computes the minimum value of `array`. If `array` is empty or falsey,
6358 `undefined` is returned.
6359
6360 #### Since
6361 0.1.0
6362 #### Arguments
6363 1. `array` *(Array)*: The array to iterate over.
6364
6365 #### Returns
6366 *(&#42;)*: Returns the minimum value.
6367
6368 #### Example
6369 ```js
6370 _.min([4, 2, 8, 6]);
6371 // => 2
6372
6373 _.min([]);
6374 // => undefined
6375 ```
6376 * * *
6377
6378 <!-- /div -->
6379
6380 <!-- div -->
6381
6382 ### <a id="_minbyarray-iteratee_identity"></a>`_.minBy(array, [iteratee=_.identity])`
6383 <a href="#_minbyarray-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15698 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.minby "See the npm package")
6384
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)*.
6388
6389 #### Since
6390 4.0.0
6391 #### Arguments
6392 1. `array` *(Array)*: The array to iterate over.
6393 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
6394
6395 #### Returns
6396 *(&#42;)*: Returns the minimum value.
6397
6398 #### Example
6399 ```js
6400 var objects = [{ 'n': 1 }, { 'n': 2 }];
6401
6402 _.minBy(objects, function(o) { return o.n; });
6403 // => { 'n': 1 }
6404
6405 // The `_.property` iteratee shorthand.
6406 _.minBy(objects, 'n');
6407 // => { 'n': 1 }
6408 ```
6409 * * *
6410
6411 <!-- /div -->
6412
6413 <!-- div -->
6414
6415 ### <a id="_multiplymultiplier-multiplicand"></a>`_.multiply(multiplier, multiplicand)`
6416 <a href="#_multiplymultiplier-multiplicand">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15719 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.multiply "See the npm package")
6417
6418 Multiply two numbers.
6419
6420 #### Since
6421 4.7.0
6422 #### Arguments
6423 1. `multiplier` *(number)*: The first number in a multiplication.
6424 2. `multiplicand` *(number)*: The second number in a multiplication.
6425
6426 #### Returns
6427 *(number)*: Returns the product.
6428
6429 #### Example
6430 ```js
6431 _.multiply(6, 4);
6432 // => 24
6433 ```
6434 * * *
6435
6436 <!-- /div -->
6437
6438 <!-- div -->
6439
6440 ### <a id="_roundnumber-precision0"></a>`_.round(number, [precision=0])`
6441 <a href="#_roundnumber-precision0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15744 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.round "See the npm package")
6442
6443 Computes `number` rounded to `precision`.
6444
6445 #### Since
6446 3.10.0
6447 #### Arguments
6448 1. `number` *(number)*: The number to round.
6449 2. `[precision=0]` *(number)*: The precision to round to.
6450
6451 #### Returns
6452 *(number)*: Returns the rounded number.
6453
6454 #### Example
6455 ```js
6456 _.round(4.006);
6457 // => 4
6458
6459 _.round(4.006, 2);
6460 // => 4.01
6461
6462 _.round(4060, -2);
6463 // => 4100
6464 ```
6465 * * *
6466
6467 <!-- /div -->
6468
6469 <!-- div -->
6470
6471 ### <a id="_subtractminuend-subtrahend"></a>`_.subtract(minuend, subtrahend)`
6472 <a href="#_subtractminuend-subtrahend">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15761 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.subtract "See the npm package")
6473
6474 Subtract two numbers.
6475
6476 #### Since
6477 4.0.0
6478 #### Arguments
6479 1. `minuend` *(number)*: The first number in a subtraction.
6480 2. `subtrahend` *(number)*: The second number in a subtraction.
6481
6482 #### Returns
6483 *(number)*: Returns the difference.
6484
6485 #### Example
6486 ```js
6487 _.subtract(6, 4);
6488 // => 2
6489 ```
6490 * * *
6491
6492 <!-- /div -->
6493
6494 <!-- div -->
6495
6496 ### <a id="_sumarray"></a>`_.sum(array)`
6497 <a href="#_sumarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15779 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sum "See the npm package")
6498
6499 Computes the sum of the values in `array`.
6500
6501 #### Since
6502 3.4.0
6503 #### Arguments
6504 1. `array` *(Array)*: The array to iterate over.
6505
6506 #### Returns
6507 *(number)*: Returns the sum.
6508
6509 #### Example
6510 ```js
6511 _.sum([4, 2, 8, 6]);
6512 // => 20
6513 ```
6514 * * *
6515
6516 <!-- /div -->
6517
6518 <!-- div -->
6519
6520 ### <a id="_sumbyarray-iteratee_identity"></a>`_.sumBy(array, [iteratee=_.identity])`
6521 <a href="#_sumbyarray-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15809 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.sumby "See the npm package")
6522
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)*.
6526
6527 #### Since
6528 4.0.0
6529 #### Arguments
6530 1. `array` *(Array)*: The array to iterate over.
6531 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
6532
6533 #### Returns
6534 *(number)*: Returns the sum.
6535
6536 #### Example
6537 ```js
6538 var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
6539
6540 _.sumBy(objects, function(o) { return o.n; });
6541 // => 20
6542
6543 // The `_.property` iteratee shorthand.
6544 _.sumBy(objects, 'n');
6545 // => 20
6546 ```
6547 * * *
6548
6549 <!-- /div -->
6550
6551 <!-- /div -->
6552
6553 <!-- div -->
6554
6555 ## `“Number” Methods`
6556
6557 <!-- div -->
6558
6559 ### <a id="_clampnumber-lower-upper"></a>`_.clamp(number, [lower], upper)`
6560 <a href="#_clampnumber-lower-upper">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13306 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.clamp "See the npm package")
6561
6562 Clamps `number` within the inclusive `lower` and `upper` bounds.
6563
6564 #### Since
6565 4.0.0
6566 #### Arguments
6567 1. `number` *(number)*: The number to clamp.
6568 2. `[lower]` *(number)*: The lower bound.
6569 3. `upper` *(number)*: The upper bound.
6570
6571 #### Returns
6572 *(number)*: Returns the clamped number.
6573
6574 #### Example
6575 ```js
6576 _.clamp(-10, -5, 5);
6577 // => -5
6578
6579 _.clamp(10, -5, 5);
6580 // => 5
6581 ```
6582 * * *
6583
6584 <!-- /div -->
6585
6586 <!-- div -->
6587
6588 ### <a id="_inrangenumber-start0-end"></a>`_.inRange(number, [start=0], end)`
6589 <a href="#_inrangenumber-start0-end">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13360 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.inrange "See the npm package")
6590
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
6594 negative ranges.
6595
6596 #### Since
6597 3.3.0
6598 #### Arguments
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.
6602
6603 #### Returns
6604 *(boolean)*: Returns `true` if `number` is in the range, else `false`.
6605
6606 #### Example
6607 ```js
6608 _.inRange(3, 2, 4);
6609 // => true
6610
6611 _.inRange(4, 8);
6612 // => true
6613
6614 _.inRange(4, 2);
6615 // => false
6616
6617 _.inRange(2, 2);
6618 // => false
6619
6620 _.inRange(1.2, 2);
6621 // => true
6622
6623 _.inRange(5.2, 4);
6624 // => false
6625
6626 _.inRange(-3, -2, -6);
6627 // => true
6628 ```
6629 * * *
6630
6631 <!-- /div -->
6632
6633 <!-- div -->
6634
6635 ### <a id="_randomlower0-upper1-floating"></a>`_.random([lower=0], [upper=1], [floating])`
6636 <a href="#_randomlower0-upper1-floating">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13403 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.random "See the npm package")
6637
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.
6642 <br>
6643 <br>
6644 **Note:** JavaScript follows the IEEE-754 standard for resolving
6645 floating-point values which can produce unexpected results.
6646
6647 #### Since
6648 0.7.0
6649 #### Arguments
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.
6653
6654 #### Returns
6655 *(number)*: Returns the random number.
6656
6657 #### Example
6658 ```js
6659 _.random(0, 5);
6660 // => an integer between 0 and 5
6661
6662 _.random(5);
6663 // => also an integer between 0 and 5
6664
6665 _.random(5, true);
6666 // => a floating-point number between 0 and 5
6667
6668 _.random(1.2, 5.2);
6669 // => a floating-point number between 1.2 and 5.2
6670 ```
6671 * * *
6672
6673 <!-- /div -->
6674
6675 <!-- /div -->
6676
6677 <!-- div -->
6678
6679 ## `“Object” Methods`
6680
6681 <!-- div -->
6682
6683 ### <a id="_assignobject-sources"></a>`_.assign(object, [sources])`
6684 <a href="#_assignobject-sources">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11923 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.assign "See the npm package")
6685
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.
6689 <br>
6690 <br>
6691 **Note:** This method mutates `object` and is loosely based on
6692 [`Object.assign`](https://mdn.io/Object/assign).
6693
6694 #### Since
6695 0.10.0
6696 #### Arguments
6697 1. `object` *(Object)*: The destination object.
6698 2. `[sources]` *(...Object)*: The source objects.
6699
6700 #### Returns
6701 *(Object)*: Returns `object`.
6702
6703 #### Example
6704 ```js
6705 function Foo() {
6706   this.c = 3;
6707 }
6708
6709 function Bar() {
6710   this.e = 5;
6711 }
6712
6713 Foo.prototype.d = 4;
6714 Bar.prototype.f = 6;
6715
6716 _.assign({ 'a': 1 }, new Foo, new Bar);
6717 // => { 'a': 1, 'c': 3, 'e': 5 }
6718 ```
6719 * * *
6720
6721 <!-- /div -->
6722
6723 <!-- div -->
6724
6725 ### <a id="_assigninobject-sources"></a>`_.assignIn(object, [sources])`
6726 <a href="#_assigninobject-sources">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11966 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.assignin "See the npm package")
6727
6728 This method is like `_.assign` except that it iterates over own and
6729 inherited source properties.
6730 <br>
6731 <br>
6732 **Note:** This method mutates `object`.
6733
6734 #### Since
6735 4.0.0
6736 #### Aliases
6737 *_.extend*
6738
6739 #### Arguments
6740 1. `object` *(Object)*: The destination object.
6741 2. `[sources]` *(...Object)*: The source objects.
6742
6743 #### Returns
6744 *(Object)*: Returns `object`.
6745
6746 #### Example
6747 ```js
6748 function Foo() {
6749   this.b = 2;
6750 }
6751
6752 function Bar() {
6753   this.d = 4;
6754 }
6755
6756 Foo.prototype.c = 3;
6757 Bar.prototype.e = 5;
6758
6759 _.assignIn({ 'a': 1 }, new Foo, new Bar);
6760 // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
6761 ```
6762 * * *
6763
6764 <!-- /div -->
6765
6766 <!-- div -->
6767
6768 ### <a id="_assigninwithobject-sources-customizer"></a>`_.assignInWith(object, sources, [customizer])`
6769 <a href="#_assigninwithobject-sources-customizer">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12005 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.assigninwith "See the npm package")
6770
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)*.
6775 <br>
6776 <br>
6777 **Note:** This method mutates `object`.
6778
6779 #### Since
6780 4.0.0
6781 #### Aliases
6782 *_.extendWith*
6783
6784 #### Arguments
6785 1. `object` *(Object)*: The destination object.
6786 2. `sources` *(...Object)*: The source objects.
6787 3. `[customizer]` *(Function)*: The function to customize assigned values.
6788
6789 #### Returns
6790 *(Object)*: Returns `object`.
6791
6792 #### Example
6793 ```js
6794 function customizer(objValue, srcValue) {
6795   return _.isUndefined(objValue) ? srcValue : objValue;
6796 }
6797
6798 var defaults = _.partialRight(_.assignInWith, customizer);
6799
6800 defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
6801 // => { 'a': 1, 'b': 2 }
6802 ```
6803 * * *
6804
6805 <!-- /div -->
6806
6807 <!-- div -->
6808
6809 ### <a id="_assignwithobject-sources-customizer"></a>`_.assignWith(object, sources, [customizer])`
6810 <a href="#_assignwithobject-sources-customizer">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12037 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.assignwith "See the npm package")
6811
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)*.
6816 <br>
6817 <br>
6818 **Note:** This method mutates `object`.
6819
6820 #### Since
6821 4.0.0
6822 #### Arguments
6823 1. `object` *(Object)*: The destination object.
6824 2. `sources` *(...Object)*: The source objects.
6825 3. `[customizer]` *(Function)*: The function to customize assigned values.
6826
6827 #### Returns
6828 *(Object)*: Returns `object`.
6829
6830 #### Example
6831 ```js
6832 function customizer(objValue, srcValue) {
6833   return _.isUndefined(objValue) ? srcValue : objValue;
6834 }
6835
6836 var defaults = _.partialRight(_.assignWith, customizer);
6837
6838 defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
6839 // => { 'a': 1, 'b': 2 }
6840 ```
6841 * * *
6842
6843 <!-- /div -->
6844
6845 <!-- div -->
6846
6847 ### <a id="_atobject-paths"></a>`_.at(object, [paths])`
6848 <a href="#_atobject-paths">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12058 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.at "See the npm package")
6849
6850 Creates an array of values corresponding to `paths` of `object`.
6851
6852 #### Since
6853 1.0.0
6854 #### Arguments
6855 1. `object` *(Object)*: The object to iterate over.
6856 2. `[paths]` *(...(string|string&#91;&#93;))*: The property paths of elements to pick.
6857
6858 #### Returns
6859 *(Array)*: Returns the picked values.
6860
6861 #### Example
6862 ```js
6863 var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
6864
6865 _.at(object, ['a[0].b.c', 'a[1]']);
6866 // => [3, 4]
6867 ```
6868 * * *
6869
6870 <!-- /div -->
6871
6872 <!-- div -->
6873
6874 ### <a id="_createprototype-properties"></a>`_.create(prototype, [properties])`
6875 <a href="#_createprototype-properties">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12096 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.create "See the npm package")
6876
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.
6880
6881 #### Since
6882 2.3.0
6883 #### Arguments
6884 1. `prototype` *(Object)*: The object to inherit from.
6885 2. `[properties]` *(Object)*: The properties to assign to the object.
6886
6887 #### Returns
6888 *(Object)*: Returns the new object.
6889
6890 #### Example
6891 ```js
6892 function Shape() {
6893   this.x = 0;
6894   this.y = 0;
6895 }
6896
6897 function Circle() {
6898   Shape.call(this);
6899 }
6900
6901 Circle.prototype = _.create(Shape.prototype, {
6902   'constructor': Circle
6903 });
6904
6905 var circle = new Circle;
6906 circle instanceof Circle;
6907 // => true
6908
6909 circle instanceof Shape;
6910 // => true
6911 ```
6912 * * *
6913
6914 <!-- /div -->
6915
6916 <!-- div -->
6917
6918 ### <a id="_defaultsobject-sources"></a>`_.defaults(object, [sources])`
6919 <a href="#_defaultsobject-sources">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12122 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.defaults "See the npm package")
6920
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.
6925 <br>
6926 <br>
6927 **Note:** This method mutates `object`.
6928
6929 #### Since
6930 0.1.0
6931 #### Arguments
6932 1. `object` *(Object)*: The destination object.
6933 2. `[sources]` *(...Object)*: The source objects.
6934
6935 #### Returns
6936 *(Object)*: Returns `object`.
6937
6938 #### Example
6939 ```js
6940 _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
6941 // => { 'user': 'barney', 'age': 36 }
6942 ```
6943 * * *
6944
6945 <!-- /div -->
6946
6947 <!-- div -->
6948
6949 ### <a id="_defaultsdeepobject-sources"></a>`_.defaultsDeep(object, [sources])`
6950 <a href="#_defaultsdeepobject-sources">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12147 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.defaultsdeep "See the npm package")
6951
6952 This method is like `_.defaults` except that it recursively assigns
6953 default properties.
6954 <br>
6955 <br>
6956 **Note:** This method mutates `object`.
6957
6958 #### Since
6959 3.10.0
6960 #### Arguments
6961 1. `object` *(Object)*: The destination object.
6962 2. `[sources]` *(...Object)*: The source objects.
6963
6964 #### Returns
6965 *(Object)*: Returns `object`.
6966
6967 #### Example
6968 ```js
6969 _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
6970 // => { 'user': { 'name': 'barney', 'age': 36 } }
6971 ```
6972 * * *
6973
6974 <!-- /div -->
6975
6976 <!-- div -->
6977
6978 ### <a id="_findkeyobject-predicate_identity"></a>`_.findKey(object, [predicate=_.identity])`
6979 <a href="#_findkeyobject-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12188 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.findkey "See the npm package")
6980
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.
6983
6984 #### Since
6985 1.1.0
6986 #### Arguments
6987 1. `object` *(Object)*: The object to search.
6988 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
6989
6990 #### Returns
6991 *(&#42;)*: Returns the key of the matched element, else `undefined`.
6992
6993 #### Example
6994 ```js
6995 var users = {
6996   'barney':  { 'age': 36, 'active': true },
6997   'fred':    { 'age': 40, 'active': false },
6998   'pebbles': { 'age': 1,  'active': true }
6999 };
7000
7001 _.findKey(users, function(o) { return o.age < 40; });
7002 // => 'barney' (iteration order is not guaranteed)
7003
7004 // The `_.matches` iteratee shorthand.
7005 _.findKey(users, { 'age': 1, 'active': true });
7006 // => 'pebbles'
7007
7008 // The `_.matchesProperty` iteratee shorthand.
7009 _.findKey(users, ['active', false]);
7010 // => 'fred'
7011
7012 // The `_.property` iteratee shorthand.
7013 _.findKey(users, 'active');
7014 // => 'barney'
7015 ```
7016 * * *
7017
7018 <!-- /div -->
7019
7020 <!-- div -->
7021
7022 ### <a id="_findlastkeyobject-predicate_identity"></a>`_.findLastKey(object, [predicate=_.identity])`
7023 <a href="#_findlastkeyobject-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12228 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.findlastkey "See the npm package")
7024
7025 This method is like `_.findKey` except that it iterates over elements of
7026 a collection in the opposite order.
7027
7028 #### Since
7029 2.0.0
7030 #### Arguments
7031 1. `object` *(Object)*: The object to search.
7032 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
7033
7034 #### Returns
7035 *(&#42;)*: Returns the key of the matched element, else `undefined`.
7036
7037 #### Example
7038 ```js
7039 var users = {
7040   'barney':  { 'age': 36, 'active': true },
7041   'fred':    { 'age': 40, 'active': false },
7042   'pebbles': { 'age': 1,  'active': true }
7043 };
7044
7045 _.findLastKey(users, function(o) { return o.age < 40; });
7046 // => returns 'pebbles' assuming `_.findKey` returns 'barney'
7047
7048 // The `_.matches` iteratee shorthand.
7049 _.findLastKey(users, { 'age': 36, 'active': true });
7050 // => 'barney'
7051
7052 // The `_.matchesProperty` iteratee shorthand.
7053 _.findLastKey(users, ['active', false]);
7054 // => 'fred'
7055
7056 // The `_.property` iteratee shorthand.
7057 _.findLastKey(users, 'active');
7058 // => 'pebbles'
7059 ```
7060 * * *
7061
7062 <!-- /div -->
7063
7064 <!-- div -->
7065
7066 ### <a id="_forinobject-iteratee_identity"></a>`_.forIn(object, [iteratee=_.identity])`
7067 <a href="#_forinobject-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12260 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.forin "See the npm package")
7068
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`.
7073
7074 #### Since
7075 0.3.0
7076 #### Arguments
7077 1. `object` *(Object)*: The object to iterate over.
7078 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
7079
7080 #### Returns
7081 *(Object)*: Returns `object`.
7082
7083 #### Example
7084 ```js
7085 function Foo() {
7086   this.a = 1;
7087   this.b = 2;
7088 }
7089
7090 Foo.prototype.c = 3;
7091
7092 _.forIn(new Foo, function(value, key) {
7093   console.log(key);
7094 });
7095 // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
7096 ```
7097 * * *
7098
7099 <!-- /div -->
7100
7101 <!-- div -->
7102
7103 ### <a id="_forinrightobject-iteratee_identity"></a>`_.forInRight(object, [iteratee=_.identity])`
7104 <a href="#_forinrightobject-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12292 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.forinright "See the npm package")
7105
7106 This method is like `_.forIn` except that it iterates over properties of
7107 `object` in the opposite order.
7108
7109 #### Since
7110 2.0.0
7111 #### Arguments
7112 1. `object` *(Object)*: The object to iterate over.
7113 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
7114
7115 #### Returns
7116 *(Object)*: Returns `object`.
7117
7118 #### Example
7119 ```js
7120 function Foo() {
7121   this.a = 1;
7122   this.b = 2;
7123 }
7124
7125 Foo.prototype.c = 3;
7126
7127 _.forInRight(new Foo, function(value, key) {
7128   console.log(key);
7129 });
7130 // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
7131 ```
7132 * * *
7133
7134 <!-- /div -->
7135
7136 <!-- div -->
7137
7138 ### <a id="_forownobject-iteratee_identity"></a>`_.forOwn(object, [iteratee=_.identity])`
7139 <a href="#_forownobject-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12326 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.forown "See the npm package")
7140
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`.
7145
7146 #### Since
7147 0.3.0
7148 #### Arguments
7149 1. `object` *(Object)*: The object to iterate over.
7150 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
7151
7152 #### Returns
7153 *(Object)*: Returns `object`.
7154
7155 #### Example
7156 ```js
7157 function Foo() {
7158   this.a = 1;
7159   this.b = 2;
7160 }
7161
7162 Foo.prototype.c = 3;
7163
7164 _.forOwn(new Foo, function(value, key) {
7165   console.log(key);
7166 });
7167 // => Logs 'a' then 'b' (iteration order is not guaranteed).
7168 ```
7169 * * *
7170
7171 <!-- /div -->
7172
7173 <!-- div -->
7174
7175 ### <a id="_forownrightobject-iteratee_identity"></a>`_.forOwnRight(object, [iteratee=_.identity])`
7176 <a href="#_forownrightobject-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12356 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.forownright "See the npm package")
7177
7178 This method is like `_.forOwn` except that it iterates over properties of
7179 `object` in the opposite order.
7180
7181 #### Since
7182 2.0.0
7183 #### Arguments
7184 1. `object` *(Object)*: The object to iterate over.
7185 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
7186
7187 #### Returns
7188 *(Object)*: Returns `object`.
7189
7190 #### Example
7191 ```js
7192 function Foo() {
7193   this.a = 1;
7194   this.b = 2;
7195 }
7196
7197 Foo.prototype.c = 3;
7198
7199 _.forOwnRight(new Foo, function(value, key) {
7200   console.log(key);
7201 });
7202 // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
7203 ```
7204 * * *
7205
7206 <!-- /div -->
7207
7208 <!-- div -->
7209
7210 ### <a id="_functionsobject"></a>`_.functions(object)`
7211 <a href="#_functionsobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12383 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.functions "See the npm package")
7212
7213 Creates an array of function property names from own enumerable properties
7214 of `object`.
7215
7216 #### Since
7217 0.1.0
7218 #### Arguments
7219 1. `object` *(Object)*: The object to inspect.
7220
7221 #### Returns
7222 *(Array)*: Returns the function names.
7223
7224 #### Example
7225 ```js
7226 function Foo() {
7227   this.a = _.constant('a');
7228   this.b = _.constant('b');
7229 }
7230
7231 Foo.prototype.c = _.constant('c');
7232
7233 _.functions(new Foo);
7234 // => ['a', 'b']
7235 ```
7236 * * *
7237
7238 <!-- /div -->
7239
7240 <!-- div -->
7241
7242 ### <a id="_functionsinobject"></a>`_.functionsIn(object)`
7243 <a href="#_functionsinobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12410 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.functionsin "See the npm package")
7244
7245 Creates an array of function property names from own and inherited
7246 enumerable properties of `object`.
7247
7248 #### Since
7249 4.0.0
7250 #### Arguments
7251 1. `object` *(Object)*: The object to inspect.
7252
7253 #### Returns
7254 *(Array)*: Returns the function names.
7255
7256 #### Example
7257 ```js
7258 function Foo() {
7259   this.a = _.constant('a');
7260   this.b = _.constant('b');
7261 }
7262
7263 Foo.prototype.c = _.constant('c');
7264
7265 _.functionsIn(new Foo);
7266 // => ['a', 'b', 'c']
7267 ```
7268 * * *
7269
7270 <!-- /div -->
7271
7272 <!-- div -->
7273
7274 ### <a id="_getobject-path-defaultvalue"></a>`_.get(object, path, [defaultValue])`
7275 <a href="#_getobject-path-defaultvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12439 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.get "See the npm package")
7276
7277 Gets the value at `path` of `object`. If the resolved value is
7278 `undefined`, the `defaultValue` is used in its place.
7279
7280 #### Since
7281 3.7.0
7282 #### Arguments
7283 1. `object` *(Object)*: The object to query.
7284 2. `path` *(Array|string)*: The path of the property to get.
7285 3. `[defaultValue]` *(&#42;)*: The value returned for `undefined` resolved values.
7286
7287 #### Returns
7288 *(&#42;)*: Returns the resolved value.
7289
7290 #### Example
7291 ```js
7292 var object = { 'a': [{ 'b': { 'c': 3 } }] };
7293
7294 _.get(object, 'a[0].b.c');
7295 // => 3
7296
7297 _.get(object, ['a', '0', 'b', 'c']);
7298 // => 3
7299
7300 _.get(object, 'a.b.c', 'default');
7301 // => 'default'
7302 ```
7303 * * *
7304
7305 <!-- /div -->
7306
7307 <!-- div -->
7308
7309 ### <a id="_hasobject-path"></a>`_.has(object, path)`
7310 <a href="#_hasobject-path">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12471 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.has "See the npm package")
7311
7312 Checks if `path` is a direct property of `object`.
7313
7314 #### Since
7315 0.1.0
7316 #### Arguments
7317 1. `object` *(Object)*: The object to query.
7318 2. `path` *(Array|string)*: The path to check.
7319
7320 #### Returns
7321 *(boolean)*: Returns `true` if `path` exists, else `false`.
7322
7323 #### Example
7324 ```js
7325 var object = { 'a': { 'b': 2 } };
7326 var other = _.create({ 'a': _.create({ 'b': 2 }) });
7327
7328 _.has(object, 'a');
7329 // => true
7330
7331 _.has(object, 'a.b');
7332 // => true
7333
7334 _.has(object, ['a', 'b']);
7335 // => true
7336
7337 _.has(other, 'a');
7338 // => false
7339 ```
7340 * * *
7341
7342 <!-- /div -->
7343
7344 <!-- div -->
7345
7346 ### <a id="_hasinobject-path"></a>`_.hasIn(object, path)`
7347 <a href="#_hasinobject-path">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12501 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.hasin "See the npm package")
7348
7349 Checks if `path` is a direct or inherited property of `object`.
7350
7351 #### Since
7352 4.0.0
7353 #### Arguments
7354 1. `object` *(Object)*: The object to query.
7355 2. `path` *(Array|string)*: The path to check.
7356
7357 #### Returns
7358 *(boolean)*: Returns `true` if `path` exists, else `false`.
7359
7360 #### Example
7361 ```js
7362 var object = _.create({ 'a': _.create({ 'b': 2 }) });
7363
7364 _.hasIn(object, 'a');
7365 // => true
7366
7367 _.hasIn(object, 'a.b');
7368 // => true
7369
7370 _.hasIn(object, ['a', 'b']);
7371 // => true
7372
7373 _.hasIn(object, 'b');
7374 // => false
7375 ```
7376 * * *
7377
7378 <!-- /div -->
7379
7380 <!-- div -->
7381
7382 ### <a id="_invertobject"></a>`_.invert(object)`
7383 <a href="#_invertobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12523 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.invert "See the npm package")
7384
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.
7388
7389 #### Since
7390 0.7.0
7391 #### Arguments
7392 1. `object` *(Object)*: The object to invert.
7393
7394 #### Returns
7395 *(Object)*: Returns the new inverted object.
7396
7397 #### Example
7398 ```js
7399 var object = { 'a': 1, 'b': 2, 'c': 1 };
7400
7401 _.invert(object);
7402 // => { '1': 'c', '2': 'b' }
7403 ```
7404 * * *
7405
7406 <!-- /div -->
7407
7408 <!-- div -->
7409
7410 ### <a id="_invertbyobject-iteratee_identity"></a>`_.invertBy(object, [iteratee=_.identity])`
7411 <a href="#_invertbyobject-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12554 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.invertby "See the npm package")
7412
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)*.
7418
7419 #### Since
7420 4.1.0
7421 #### Arguments
7422 1. `object` *(Object)*: The object to invert.
7423 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The iteratee invoked per element.
7424
7425 #### Returns
7426 *(Object)*: Returns the new inverted object.
7427
7428 #### Example
7429 ```js
7430 var object = { 'a': 1, 'b': 2, 'c': 1 };
7431
7432 _.invertBy(object);
7433 // => { '1': ['a', 'c'], '2': ['b'] }
7434
7435 _.invertBy(object, function(value) {
7436   return 'group' + value;
7437 });
7438 // => { 'group1': ['a', 'c'], 'group2': ['b'] }
7439 ```
7440 * * *
7441
7442 <!-- /div -->
7443
7444 <!-- div -->
7445
7446 ### <a id="_invokeobject-path-args"></a>`_.invoke(object, path, [args])`
7447 <a href="#_invokeobject-path-args">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12580 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.invoke "See the npm package")
7448
7449 Invokes the method at `path` of `object`.
7450
7451 #### Since
7452 4.0.0
7453 #### Arguments
7454 1. `object` *(Object)*: The object to query.
7455 2. `path` *(Array|string)*: The path of the method to invoke.
7456 3. `[args]` *(...&#42;)*: The arguments to invoke the method with.
7457
7458 #### Returns
7459 *(&#42;)*: Returns the result of the invoked method.
7460
7461 #### Example
7462 ```js
7463 var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
7464
7465 _.invoke(object, 'a[0].b.c.slice', 1, 3);
7466 // => [2, 3]
7467 ```
7468 * * *
7469
7470 <!-- /div -->
7471
7472 <!-- div -->
7473
7474 ### <a id="_keysobject"></a>`_.keys(object)`
7475 <a href="#_keysobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12610 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.keys "See the npm package")
7476
7477 Creates an array of the own enumerable property names of `object`.
7478 <br>
7479 <br>
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)
7482 for more details.
7483
7484 #### Since
7485 0.1.0
7486 #### Arguments
7487 1. `object` *(Object)*: The object to query.
7488
7489 #### Returns
7490 *(Array)*: Returns the array of property names.
7491
7492 #### Example
7493 ```js
7494 function Foo() {
7495   this.a = 1;
7496   this.b = 2;
7497 }
7498
7499 Foo.prototype.c = 3;
7500
7501 _.keys(new Foo);
7502 // => ['a', 'b'] (iteration order is not guaranteed)
7503
7504 _.keys('hi');
7505 // => ['0', '1']
7506 ```
7507 * * *
7508
7509 <!-- /div -->
7510
7511 <!-- div -->
7512
7513 ### <a id="_keysinobject"></a>`_.keysIn(object)`
7514 <a href="#_keysinobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12653 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.keysin "See the npm package")
7515
7516 Creates an array of the own and inherited enumerable property names of `object`.
7517 <br>
7518 <br>
7519 **Note:** Non-object values are coerced to objects.
7520
7521 #### Since
7522 3.0.0
7523 #### Arguments
7524 1. `object` *(Object)*: The object to query.
7525
7526 #### Returns
7527 *(Array)*: Returns the array of property names.
7528
7529 #### Example
7530 ```js
7531 function Foo() {
7532   this.a = 1;
7533   this.b = 2;
7534 }
7535
7536 Foo.prototype.c = 3;
7537
7538 _.keysIn(new Foo);
7539 // => ['a', 'b', 'c'] (iteration order is not guaranteed)
7540 ```
7541 * * *
7542
7543 <!-- /div -->
7544
7545 <!-- div -->
7546
7547 ### <a id="_mapkeysobject-iteratee_identity"></a>`_.mapKeys(object, [iteratee=_.identity])`
7548 <a href="#_mapkeysobject-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12695 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.mapkeys "See the npm package")
7549
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)*.
7554
7555 #### Since
7556 3.8.0
7557 #### Arguments
7558 1. `object` *(Object)*: The object to iterate over.
7559 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
7560
7561 #### Returns
7562 *(Object)*: Returns the new mapped object.
7563
7564 #### Example
7565 ```js
7566 _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
7567   return key + value;
7568 });
7569 // => { 'a1': 1, 'b2': 2 }
7570 ```
7571 * * *
7572
7573 <!-- /div -->
7574
7575 <!-- div -->
7576
7577 ### <a id="_mapvaluesobject-iteratee_identity"></a>`_.mapValues(object, [iteratee=_.identity])`
7578 <a href="#_mapvaluesobject-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12734 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.mapvalues "See the npm package")
7579
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)*.
7584
7585 #### Since
7586 2.4.0
7587 #### Arguments
7588 1. `object` *(Object)*: The object to iterate over.
7589 2. `[iteratee=_.identity]` *(Array|Function|Object|string)*: The function invoked per iteration.
7590
7591 #### Returns
7592 *(Object)*: Returns the new mapped object.
7593
7594 #### Example
7595 ```js
7596 var users = {
7597   'fred':    { 'user': 'fred',    'age': 40 },
7598   'pebbles': { 'user': 'pebbles', 'age': 1 }
7599 };
7600
7601 _.mapValues(users, function(o) { return o.age; });
7602 // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
7603
7604 // The `_.property` iteratee shorthand.
7605 _.mapValues(users, 'age');
7606 // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
7607 ```
7608 * * *
7609
7610 <!-- /div -->
7611
7612 <!-- div -->
7613
7614 ### <a id="_mergeobject-sources"></a>`_.merge(object, [sources])`
7615 <a href="#_mergeobject-sources">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12775 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.merge "See the npm package")
7616
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.
7624 <br>
7625 <br>
7626 **Note:** This method mutates `object`.
7627
7628 #### Since
7629 0.5.0
7630 #### Arguments
7631 1. `object` *(Object)*: The destination object.
7632 2. `[sources]` *(...Object)*: The source objects.
7633
7634 #### Returns
7635 *(Object)*: Returns `object`.
7636
7637 #### Example
7638 ```js
7639 var users = {
7640   'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
7641 };
7642
7643 var ages = {
7644   'data': [{ 'age': 36 }, { 'age': 40 }]
7645 };
7646
7647 _.merge(users, ages);
7648 // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
7649 ```
7650 * * *
7651
7652 <!-- /div -->
7653
7654 <!-- div -->
7655
7656 ### <a id="_mergewithobject-sources-customizer"></a>`_.mergeWith(object, sources, customizer)`
7657 <a href="#_mergewithobject-sources-customizer">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12817 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.mergewith "See the npm package")
7658
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)*.
7664 <br>
7665 <br>
7666 **Note:** This method mutates `object`.
7667
7668 #### Since
7669 4.0.0
7670 #### Arguments
7671 1. `object` *(Object)*: The destination object.
7672 2. `sources` *(...Object)*: The source objects.
7673 3. `customizer` *(Function)*: The function to customize assigned values.
7674
7675 #### Returns
7676 *(Object)*: Returns `object`.
7677
7678 #### Example
7679 ```js
7680 function customizer(objValue, srcValue) {
7681   if (_.isArray(objValue)) {
7682     return objValue.concat(srcValue);
7683   }
7684 }
7685
7686 var object = {
7687   'fruits': ['apple'],
7688   'vegetables': ['beet']
7689 };
7690
7691 var other = {
7692   'fruits': ['banana'],
7693   'vegetables': ['carrot']
7694 };
7695
7696 _.mergeWith(object, other, customizer);
7697 // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
7698 ```
7699 * * *
7700
7701 <!-- /div -->
7702
7703 <!-- div -->
7704
7705 ### <a id="_omitobject-props"></a>`_.omit(object, [props])`
7706 <a href="#_omitobject-props">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12840 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.omit "See the npm package")
7707
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
7710 not omitted.
7711
7712 #### Since
7713 0.1.0
7714 #### Arguments
7715 1. `object` *(Object)*: The source object.
7716 2. `[props]` *(...(string|string&#91;&#93;))*: The property identifiers to omit.
7717
7718 #### Returns
7719 *(Object)*: Returns the new object.
7720
7721 #### Example
7722 ```js
7723 var object = { 'a': 1, 'b': '2', 'c': 3 };
7724
7725 _.omit(object, ['a', 'c']);
7726 // => { 'b': '2' }
7727 ```
7728 * * *
7729
7730 <!-- /div -->
7731
7732 <!-- div -->
7733
7734 ### <a id="_omitbyobject-predicate_identity"></a>`_.omitBy(object, [predicate=_.identity])`
7735 <a href="#_omitbyobject-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12869 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.omitby "See the npm package")
7736
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)*.
7741
7742 #### Since
7743 4.0.0
7744 #### Arguments
7745 1. `object` *(Object)*: The source object.
7746 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per property.
7747
7748 #### Returns
7749 *(Object)*: Returns the new object.
7750
7751 #### Example
7752 ```js
7753 var object = { 'a': 1, 'b': '2', 'c': 3 };
7754
7755 _.omitBy(object, _.isNumber);
7756 // => { 'b': '2' }
7757 ```
7758 * * *
7759
7760 <!-- /div -->
7761
7762 <!-- div -->
7763
7764 ### <a id="_pickobject-props"></a>`_.pick(object, [props])`
7765 <a href="#_pickobject-props">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12893 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.pick "See the npm package")
7766
7767 Creates an object composed of the picked `object` properties.
7768
7769 #### Since
7770 0.1.0
7771 #### Arguments
7772 1. `object` *(Object)*: The source object.
7773 2. `[props]` *(...(string|string&#91;&#93;))*: The property identifiers to pick.
7774
7775 #### Returns
7776 *(Object)*: Returns the new object.
7777
7778 #### Example
7779 ```js
7780 var object = { 'a': 1, 'b': '2', 'c': 3 };
7781
7782 _.pick(object, ['a', 'c']);
7783 // => { 'a': 1, 'c': 3 }
7784 ```
7785 * * *
7786
7787 <!-- /div -->
7788
7789 <!-- div -->
7790
7791 ### <a id="_pickbyobject-predicate_identity"></a>`_.pickBy(object, [predicate=_.identity])`
7792 <a href="#_pickbyobject-predicate_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12916 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.pickby "See the npm package")
7793
7794 Creates an object composed of the `object` properties `predicate` returns
7795 truthy for. The predicate is invoked with two arguments: *(value, key)*.
7796
7797 #### Since
7798 4.0.0
7799 #### Arguments
7800 1. `object` *(Object)*: The source object.
7801 2. `[predicate=_.identity]` *(Array|Function|Object|string)*: The function invoked per property.
7802
7803 #### Returns
7804 *(Object)*: Returns the new object.
7805
7806 #### Example
7807 ```js
7808 var object = { 'a': 1, 'b': '2', 'c': 3 };
7809
7810 _.pickBy(object, _.isNumber);
7811 // => { 'a': 1, 'c': 3 }
7812 ```
7813 * * *
7814
7815 <!-- /div -->
7816
7817 <!-- div -->
7818
7819 ### <a id="_resultobject-path-defaultvalue"></a>`_.result(object, path, [defaultValue])`
7820 <a href="#_resultobject-path-defaultvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12949 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.result "See the npm package")
7821
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.
7825
7826 #### Since
7827 0.1.0
7828 #### Arguments
7829 1. `object` *(Object)*: The object to query.
7830 2. `path` *(Array|string)*: The path of the property to resolve.
7831 3. `[defaultValue]` *(&#42;)*: The value returned for `undefined` resolved values.
7832
7833 #### Returns
7834 *(&#42;)*: Returns the resolved value.
7835
7836 #### Example
7837 ```js
7838 var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
7839
7840 _.result(object, 'a[0].b.c1');
7841 // => 3
7842
7843 _.result(object, 'a[0].b.c2');
7844 // => 4
7845
7846 _.result(object, 'a[0].b.c3', 'default');
7847 // => 'default'
7848
7849 _.result(object, 'a[0].b.c3', _.constant('default'));
7850 // => 'default'
7851 ```
7852 * * *
7853
7854 <!-- /div -->
7855
7856 <!-- div -->
7857
7858 ### <a id="_setobject-path-value"></a>`_.set(object, path, value)`
7859 <a href="#_setobject-path-value">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L12999 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.set "See the npm package")
7860
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
7864 `path` creation.
7865 <br>
7866 <br>
7867 **Note:** This method mutates `object`.
7868
7869 #### Since
7870 3.7.0
7871 #### Arguments
7872 1. `object` *(Object)*: The object to modify.
7873 2. `path` *(Array|string)*: The path of the property to set.
7874 3. `value` *(&#42;)*: The value to set.
7875
7876 #### Returns
7877 *(Object)*: Returns `object`.
7878
7879 #### Example
7880 ```js
7881 var object = { 'a': [{ 'b': { 'c': 3 } }] };
7882
7883 _.set(object, 'a[0].b.c', 4);
7884 console.log(object.a[0].b.c);
7885 // => 4
7886
7887 _.set(object, ['x', '0', 'y', 'z'], 5);
7888 console.log(object.x[0].y.z);
7889 // => 5
7890 ```
7891 * * *
7892
7893 <!-- /div -->
7894
7895 <!-- div -->
7896
7897 ### <a id="_setwithobject-path-value-customizer"></a>`_.setWith(object, path, value, [customizer])`
7898 <a href="#_setwithobject-path-value-customizer">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13027 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.setwith "See the npm package")
7899
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)*.
7904 <br>
7905 <br>
7906 **Note:** This method mutates `object`.
7907
7908 #### Since
7909 4.0.0
7910 #### Arguments
7911 1. `object` *(Object)*: The object to modify.
7912 2. `path` *(Array|string)*: The path of the property to set.
7913 3. `value` *(&#42;)*: The value to set.
7914 4. `[customizer]` *(Function)*: The function to customize assigned values.
7915
7916 #### Returns
7917 *(Object)*: Returns `object`.
7918
7919 #### Example
7920 ```js
7921 var object = {};
7922
7923 _.setWith(object, '[0][1]', 'a', Object);
7924 // => { '0': { '1': 'a' } }
7925 ```
7926 * * *
7927
7928 <!-- /div -->
7929
7930 <!-- div -->
7931
7932 ### <a id="_topairsobject"></a>`_.toPairs(object)`
7933 <a href="#_topairsobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13056 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.topairs "See the npm package")
7934
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.
7938
7939 #### Since
7940 4.0.0
7941 #### Aliases
7942 *_.entries*
7943
7944 #### Arguments
7945 1. `object` *(Object)*: The object to query.
7946
7947 #### Returns
7948 *(Array)*: Returns the key-value pairs.
7949
7950 #### Example
7951 ```js
7952 function Foo() {
7953   this.a = 1;
7954   this.b = 2;
7955 }
7956
7957 Foo.prototype.c = 3;
7958
7959 _.toPairs(new Foo);
7960 // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
7961 ```
7962 * * *
7963
7964 <!-- /div -->
7965
7966 <!-- div -->
7967
7968 ### <a id="_topairsinobject"></a>`_.toPairsIn(object)`
7969 <a href="#_topairsinobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13082 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.topairsin "See the npm package")
7970
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.
7974
7975 #### Since
7976 4.0.0
7977 #### Aliases
7978 *_.entriesIn*
7979
7980 #### Arguments
7981 1. `object` *(Object)*: The object to query.
7982
7983 #### Returns
7984 *(Array)*: Returns the key-value pairs.
7985
7986 #### Example
7987 ```js
7988 function Foo() {
7989   this.a = 1;
7990   this.b = 2;
7991 }
7992
7993 Foo.prototype.c = 3;
7994
7995 _.toPairsIn(new Foo);
7996 // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
7997 ```
7998 * * *
7999
8000 <!-- /div -->
8001
8002 <!-- div -->
8003
8004 ### <a id="_transformobject-iteratee_identity-accumulator"></a>`_.transform(object, [iteratee=_.identity], [accumulator])`
8005 <a href="#_transformobject-iteratee_identity-accumulator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13114 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.transform "See the npm package")
8006
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`.
8014
8015 #### Since
8016 1.3.0
8017 #### Arguments
8018 1. `object` *(Object)*: The object to iterate over.
8019 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
8020 3. `[accumulator]` *(&#42;)*: The custom accumulator value.
8021
8022 #### Returns
8023 *(&#42;)*: Returns the accumulated value.
8024
8025 #### Example
8026 ```js
8027 _.transform([2, 3, 4], function(result, n) {
8028   result.push(n *= n);
8029   return n % 2 == 0;
8030 }, []);
8031 // => [4, 9]
8032
8033 _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
8034   (result[value] || (result[value] = [])).push(key);
8035 }, {});
8036 // => { '1': ['a', 'c'], '2': ['b'] }
8037 ```
8038 * * *
8039
8040 <!-- /div -->
8041
8042 <!-- div -->
8043
8044 ### <a id="_unsetobject-path"></a>`_.unset(object, path)`
8045 <a href="#_unsetobject-path">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13163 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.unset "See the npm package")
8046
8047 Removes the property at `path` of `object`.
8048 <br>
8049 <br>
8050 **Note:** This method mutates `object`.
8051
8052 #### Since
8053 4.0.0
8054 #### Arguments
8055 1. `object` *(Object)*: The object to modify.
8056 2. `path` *(Array|string)*: The path of the property to unset.
8057
8058 #### Returns
8059 *(boolean)*: Returns `true` if the property is deleted, else `false`.
8060
8061 #### Example
8062 ```js
8063 var object = { 'a': [{ 'b': { 'c': 7 } }] };
8064 _.unset(object, 'a[0].b.c');
8065 // => true
8066
8067 console.log(object);
8068 // => { 'a': [{ 'b': {} }] };
8069
8070 _.unset(object, ['a', '0', 'b', 'c']);
8071 // => true
8072
8073 console.log(object);
8074 // => { 'a': [{ 'b': {} }] };
8075 ```
8076 * * *
8077
8078 <!-- /div -->
8079
8080 <!-- div -->
8081
8082 ### <a id="_updateobject-path-updater"></a>`_.update(object, path, updater)`
8083 <a href="#_updateobject-path-updater">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13194 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.update "See the npm package")
8084
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)*.
8088 <br>
8089 <br>
8090 **Note:** This method mutates `object`.
8091
8092 #### Since
8093 4.6.0
8094 #### Arguments
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.
8098
8099 #### Returns
8100 *(Object)*: Returns `object`.
8101
8102 #### Example
8103 ```js
8104 var object = { 'a': [{ 'b': { 'c': 3 } }] };
8105
8106 _.update(object, 'a[0].b.c', function(n) { return n * n; });
8107 console.log(object.a[0].b.c);
8108 // => 9
8109
8110 _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
8111 console.log(object.x[0].y.z);
8112 // => 0
8113 ```
8114 * * *
8115
8116 <!-- /div -->
8117
8118 <!-- div -->
8119
8120 ### <a id="_updatewithobject-path-updater-customizer"></a>`_.updateWith(object, path, updater, [customizer])`
8121 <a href="#_updatewithobject-path-updater-customizer">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13222 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.updatewith "See the npm package")
8122
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)*.
8127 <br>
8128 <br>
8129 **Note:** This method mutates `object`.
8130
8131 #### Since
8132 4.6.0
8133 #### Arguments
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.
8138
8139 #### Returns
8140 *(Object)*: Returns `object`.
8141
8142 #### Example
8143 ```js
8144 var object = {};
8145
8146 _.updateWith(object, '[0][1]', _.constant('a'), Object);
8147 // => { '0': { '1': 'a' } }
8148 ```
8149 * * *
8150
8151 <!-- /div -->
8152
8153 <!-- div -->
8154
8155 ### <a id="_valuesobject"></a>`_.values(object)`
8156 <a href="#_valuesobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13253 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.values "See the npm package")
8157
8158 Creates an array of the own enumerable string keyed property values of `object`.
8159 <br>
8160 <br>
8161 **Note:** Non-object values are coerced to objects.
8162
8163 #### Since
8164 0.1.0
8165 #### Arguments
8166 1. `object` *(Object)*: The object to query.
8167
8168 #### Returns
8169 *(Array)*: Returns the array of property values.
8170
8171 #### Example
8172 ```js
8173 function Foo() {
8174   this.a = 1;
8175   this.b = 2;
8176 }
8177
8178 Foo.prototype.c = 3;
8179
8180 _.values(new Foo);
8181 // => [1, 2] (iteration order is not guaranteed)
8182
8183 _.values('hi');
8184 // => ['h', 'i']
8185 ```
8186 * * *
8187
8188 <!-- /div -->
8189
8190 <!-- div -->
8191
8192 ### <a id="_valuesinobject"></a>`_.valuesIn(object)`
8193 <a href="#_valuesinobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13281 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.valuesin "See the npm package")
8194
8195 Creates an array of the own and inherited enumerable string keyed property
8196 values of `object`.
8197 <br>
8198 <br>
8199 **Note:** Non-object values are coerced to objects.
8200
8201 #### Since
8202 3.0.0
8203 #### Arguments
8204 1. `object` *(Object)*: The object to query.
8205
8206 #### Returns
8207 *(Array)*: Returns the array of property values.
8208
8209 #### Example
8210 ```js
8211 function Foo() {
8212   this.a = 1;
8213   this.b = 2;
8214 }
8215
8216 Foo.prototype.c = 3;
8217
8218 _.valuesIn(new Foo);
8219 // => [1, 2, 3] (iteration order is not guaranteed)
8220 ```
8221 * * *
8222
8223 <!-- /div -->
8224
8225 <!-- /div -->
8226
8227 <!-- div -->
8228
8229 ## `“Seq” Methods`
8230
8231 <!-- div -->
8232
8233 ### <a id="_value"></a>`_(value)`
8234 <a href="#_value">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1464 "View in source") [&#x24C9;][1]
8235
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
8241 with `_#value`.
8242 <br>
8243 <br>
8244 Explicit chain sequences, which must be unwrapped with `_#value`, may be
8245 enabled using `_.chain`.
8246 <br>
8247 <br>
8248 The execution of chained methods is lazy, that is, it's deferred until
8249 `_#value` is implicitly or explicitly called.
8250 <br>
8251 <br>
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.
8259 <br>
8260 <br>
8261 Chaining is supported in custom builds as long as the `_#value` method is
8262 directly or indirectly included in the build.
8263 <br>
8264 <br>
8265 In addition to lodash methods, wrappers have `Array` and `String` methods.
8266 <br>
8267 <br>
8268 The wrapper `Array` methods are:<br>
8269 `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
8270 <br>
8271 <br>
8272 The wrapper `String` methods are:<br>
8273 `replace` and `split`
8274 <br>
8275 <br>
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`
8280 <br>
8281 <br>
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`
8307 <br>
8308 <br>
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`
8335
8336 #### Arguments
8337 1. `value` *(&#42;)*: The value to wrap in a `lodash` instance.
8338
8339 #### Returns
8340 *(Object)*: Returns the new `lodash` wrapper instance.
8341
8342 #### Example
8343 ```js
8344 function square(n) {
8345   return n * n;
8346 }
8347
8348 var wrapped = _([1, 2, 3]);
8349
8350 // Returns an unwrapped value.
8351 wrapped.reduce(_.add);
8352 // => 6
8353
8354 // Returns a wrapped value.
8355 var squares = wrapped.map(square);
8356
8357 _.isArray(squares);
8358 // => false
8359
8360 _.isArray(squares.value());
8361 // => true
8362 ```
8363 * * *
8364
8365 <!-- /div -->
8366
8367 <!-- div -->
8368
8369 ### <a id="_chainvalue"></a>`_.chain(value)`
8370 <a href="#_chainvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8031 "View in source") [&#x24C9;][1]
8371
8372 Creates a `lodash` wrapper instance that wraps `value` with explicit method
8373 chain sequences enabled. The result of such sequences must be unwrapped
8374 with `_#value`.
8375
8376 #### Since
8377 1.3.0
8378 #### Arguments
8379 1. `value` *(&#42;)*: The value to wrap.
8380
8381 #### Returns
8382 *(Object)*: Returns the new `lodash` wrapper instance.
8383
8384 #### Example
8385 ```js
8386 var users = [
8387   { 'user': 'barney',  'age': 36 },
8388   { 'user': 'fred',    'age': 40 },
8389   { 'user': 'pebbles', 'age': 1 }
8390 ];
8391
8392 var youngest = _
8393   .chain(users)
8394   .sortBy('age')
8395   .map(function(o) {
8396     return o.user + ' is ' + o.age;
8397   })
8398   .head()
8399   .value();
8400 // => 'pebbles is 1'
8401 ```
8402 * * *
8403
8404 <!-- /div -->
8405
8406 <!-- div -->
8407
8408 ### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
8409 <a href="#_tapvalue-interceptor">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8060 "View in source") [&#x24C9;][1]
8410
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.
8414
8415 #### Since
8416 0.1.0
8417 #### Arguments
8418 1. `value` *(&#42;)*: The value to provide to `interceptor`.
8419 2. `interceptor` *(Function)*: The function to invoke.
8420
8421 #### Returns
8422 *(&#42;)*: Returns `value`.
8423
8424 #### Example
8425 ```js
8426 _([1, 2, 3])
8427  .tap(function(array) {
8428    // Mutate input array.
8429    array.pop();
8430  })
8431  .reverse()
8432  .value();
8433 // => [2, 1]
8434 ```
8435 * * *
8436
8437 <!-- /div -->
8438
8439 <!-- div -->
8440
8441 ### <a id="_thruvalue-interceptor"></a>`_.thru(value, interceptor)`
8442 <a href="#_thruvalue-interceptor">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8088 "View in source") [&#x24C9;][1]
8443
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.
8447
8448 #### Since
8449 3.0.0
8450 #### Arguments
8451 1. `value` *(&#42;)*: The value to provide to `interceptor`.
8452 2. `interceptor` *(Function)*: The function to invoke.
8453
8454 #### Returns
8455 *(&#42;)*: Returns the result of `interceptor`.
8456
8457 #### Example
8458 ```js
8459 _('  abc  ')
8460  .chain()
8461  .trim()
8462  .thru(function(value) {
8463    return [value];
8464  })
8465  .value();
8466 // => ['abc']
8467 ```
8468 * * *
8469
8470 <!-- /div -->
8471
8472 <!-- div -->
8473
8474 ### <a id="_prototypesymboliterator"></a>`_.prototype[Symbol.iterator]()`
8475 <a href="#_prototypesymboliterator">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8244 "View in source") [&#x24C9;][1]
8476
8477 Enables the wrapper to be iterable.
8478
8479 #### Since
8480 4.0.0
8481 #### Returns
8482 *(Object)*: Returns the wrapper object.
8483
8484 #### Example
8485 ```js
8486 var wrapped = _([1, 2]);
8487
8488 wrapped[Symbol.iterator]() === wrapped;
8489 // => true
8490
8491 Array.from(wrapped);
8492 // => [1, 2]
8493 ```
8494 * * *
8495
8496 <!-- /div -->
8497
8498 <!-- div -->
8499
8500 ### <a id="_prototypeatpaths"></a>`_.prototype.at([paths])`
8501 <a href="#_prototypeatpaths">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8108 "View in source") [&#x24C9;][1]
8502
8503 This method is the wrapper version of `_.at`.
8504
8505 #### Since
8506 1.0.0
8507 #### Arguments
8508 1. `[paths]` *(...(string|string&#91;&#93;))*: The property paths of elements to pick.
8509
8510 #### Returns
8511 *(Object)*: Returns the new `lodash` wrapper instance.
8512
8513 #### Example
8514 ```js
8515 var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
8516
8517 _(object).at(['a[0].b.c', 'a[1]']).value();
8518 // => [3, 4]
8519 ```
8520 * * *
8521
8522 <!-- /div -->
8523
8524 <!-- div -->
8525
8526 ### <a id="_prototypechain"></a>`_.prototype.chain()`
8527 <a href="#_prototypechain">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8160 "View in source") [&#x24C9;][1]
8528
8529 Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
8530
8531 #### Since
8532 0.1.0
8533 #### Returns
8534 *(Object)*: Returns the new `lodash` wrapper instance.
8535
8536 #### Example
8537 ```js
8538 var users = [
8539   { 'user': 'barney', 'age': 36 },
8540   { 'user': 'fred',   'age': 40 }
8541 ];
8542
8543 // A sequence without explicit chaining.
8544 _(users).head();
8545 // => { 'user': 'barney', 'age': 36 }
8546
8547 // A sequence with explicit chaining.
8548 _(users)
8549   .chain()
8550   .head()
8551   .pick('user')
8552   .value();
8553 // => { 'user': 'barney' }
8554 ```
8555 * * *
8556
8557 <!-- /div -->
8558
8559 <!-- div -->
8560
8561 ### <a id="_prototypecommit"></a>`_.prototype.commit()`
8562 <a href="#_prototypecommit">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8190 "View in source") [&#x24C9;][1]
8563
8564 Executes the chain sequence and returns the wrapped result.
8565
8566 #### Since
8567 3.2.0
8568 #### Returns
8569 *(Object)*: Returns the new `lodash` wrapper instance.
8570
8571 #### Example
8572 ```js
8573 var array = [1, 2];
8574 var wrapped = _(array).push(3);
8575
8576 console.log(array);
8577 // => [1, 2]
8578
8579 wrapped = wrapped.commit();
8580 console.log(array);
8581 // => [1, 2, 3]
8582
8583 wrapped.last();
8584 // => 3
8585
8586 console.log(array);
8587 // => [1, 2, 3]
8588 ```
8589 * * *
8590
8591 <!-- /div -->
8592
8593 <!-- div -->
8594
8595 ### <a id="_prototypenext"></a>`_.prototype.next()`
8596 <a href="#_prototypenext">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8216 "View in source") [&#x24C9;][1]
8597
8598 Gets the next value on a wrapped object following the
8599 [iterator protocol](https://mdn.io/iteration_protocols#iterator).
8600
8601 #### Since
8602 4.0.0
8603 #### Returns
8604 *(Object)*: Returns the next iterator value.
8605
8606 #### Example
8607 ```js
8608 var wrapped = _([1, 2]);
8609
8610 wrapped.next();
8611 // => { 'done': false, 'value': 1 }
8612
8613 wrapped.next();
8614 // => { 'done': false, 'value': 2 }
8615
8616 wrapped.next();
8617 // => { 'done': true, 'value': undefined }
8618 ```
8619 * * *
8620
8621 <!-- /div -->
8622
8623 <!-- div -->
8624
8625 ### <a id="_prototypeplantvalue"></a>`_.prototype.plant(value)`
8626 <a href="#_prototypeplantvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8272 "View in source") [&#x24C9;][1]
8627
8628 Creates a clone of the chain sequence planting `value` as the wrapped value.
8629
8630 #### Since
8631 3.2.0
8632 #### Arguments
8633 1. `value` *(&#42;)*: The value to plant.
8634
8635 #### Returns
8636 *(Object)*: Returns the new `lodash` wrapper instance.
8637
8638 #### Example
8639 ```js
8640 function square(n) {
8641   return n * n;
8642 }
8643
8644 var wrapped = _([1, 2]).map(square);
8645 var other = wrapped.plant([3, 4]);
8646
8647 other.value();
8648 // => [9, 16]
8649
8650 wrapped.value();
8651 // => [1, 4]
8652 ```
8653 * * *
8654
8655 <!-- /div -->
8656
8657 <!-- div -->
8658
8659 ### <a id="_prototypereverse"></a>`_.prototype.reverse()`
8660 <a href="#_prototypereverse">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8312 "View in source") [&#x24C9;][1]
8661
8662 This method is the wrapper version of `_.reverse`.
8663 <br>
8664 <br>
8665 **Note:** This method mutates the wrapped array.
8666
8667 #### Since
8668 0.1.0
8669 #### Returns
8670 *(Object)*: Returns the new `lodash` wrapper instance.
8671
8672 #### Example
8673 ```js
8674 var array = [1, 2, 3];
8675
8676 _(array).reverse().value()
8677 // => [3, 2, 1]
8678
8679 console.log(array);
8680 // => [3, 2, 1]
8681 ```
8682 * * *
8683
8684 <!-- /div -->
8685
8686 <!-- div -->
8687
8688 ### <a id="_prototypevalue"></a>`_.prototype.value()`
8689 <a href="#_prototypevalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L8344 "View in source") [&#x24C9;][1]
8690
8691 Executes the chain sequence to resolve the unwrapped value.
8692
8693 #### Since
8694 0.1.0
8695 #### Aliases
8696 *_.prototype.toJSON, _.prototype.valueOf*
8697
8698 #### Returns
8699 *(&#42;)*: Returns the resolved unwrapped value.
8700
8701 #### Example
8702 ```js
8703 _([1, 2, 3]).value();
8704 // => [1, 2, 3]
8705 ```
8706 * * *
8707
8708 <!-- /div -->
8709
8710 <!-- /div -->
8711
8712 <!-- div -->
8713
8714 ## `“String” Methods`
8715
8716 <!-- div -->
8717
8718 ### <a id="_camelcasestring"></a>`_.camelCase([string=''])`
8719 <a href="#_camelcasestring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13464 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.camelcase "See the npm package")
8720
8721 Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
8722
8723 #### Since
8724 3.0.0
8725 #### Arguments
8726 1. `[string='']` *(string)*: The string to convert.
8727
8728 #### Returns
8729 *(string)*: Returns the camel cased string.
8730
8731 #### Example
8732 ```js
8733 _.camelCase('Foo Bar');
8734 // => 'fooBar'
8735
8736 _.camelCase('--foo-bar--');
8737 // => 'fooBar'
8738
8739 _.camelCase('__FOO_BAR__');
8740 // => 'fooBar'
8741 ```
8742 * * *
8743
8744 <!-- /div -->
8745
8746 <!-- div -->
8747
8748 ### <a id="_capitalizestring"></a>`_.capitalize([string=''])`
8749 <a href="#_capitalizestring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13484 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.capitalize "See the npm package")
8750
8751 Converts the first character of `string` to upper case and the remaining
8752 to lower case.
8753
8754 #### Since
8755 3.0.0
8756 #### Arguments
8757 1. `[string='']` *(string)*: The string to capitalize.
8758
8759 #### Returns
8760 *(string)*: Returns the capitalized string.
8761
8762 #### Example
8763 ```js
8764 _.capitalize('FRED');
8765 // => 'Fred'
8766 ```
8767 * * *
8768
8769 <!-- /div -->
8770
8771 <!-- div -->
8772
8773 ### <a id="_deburrstring"></a>`_.deburr([string=''])`
8774 <a href="#_deburrstring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13505 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.deburr "See the npm package")
8775
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).
8780
8781 #### Since
8782 3.0.0
8783 #### Arguments
8784 1. `[string='']` *(string)*: The string to deburr.
8785
8786 #### Returns
8787 *(string)*: Returns the deburred string.
8788
8789 #### Example
8790 ```js
8791 _.deburr('déjà vu');
8792 // => 'deja vu'
8793 ```
8794 * * *
8795
8796 <!-- /div -->
8797
8798 <!-- div -->
8799
8800 ### <a id="_endswithstring-target-positionstringlength"></a>`_.endsWith([string=''], [target], [position=string.length])`
8801 <a href="#_endswithstring-target-positionstringlength">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13533 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.endswith "See the npm package")
8802
8803 Checks if `string` ends with the given target string.
8804
8805 #### Since
8806 3.0.0
8807 #### Arguments
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.
8811
8812 #### Returns
8813 *(boolean)*: Returns `true` if `string` ends with `target`, else `false`.
8814
8815 #### Example
8816 ```js
8817 _.endsWith('abc', 'c');
8818 // => true
8819
8820 _.endsWith('abc', 'b');
8821 // => false
8822
8823 _.endsWith('abc', 'b', 2);
8824 // => true
8825 ```
8826 * * *
8827
8828 <!-- /div -->
8829
8830 <!-- div -->
8831
8832 ### <a id="_escapestring"></a>`_.escape([string=''])`
8833 <a href="#_escapestring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13580 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.escape "See the npm package")
8834
8835 Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
8836 their corresponding HTML entities.
8837 <br>
8838 <br>
8839 **Note:** No other characters are escaped. To escape additional
8840 characters use a third-party library like [_he_](https://mths.be/he).
8841 <br>
8842 <br>
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.
8848 <br>
8849 <br>
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.
8855 <br>
8856 <br>
8857 When working with HTML you should always
8858 [quote attribute values](http://wonko.com/post/html-escaping) to reduce
8859 XSS vectors.
8860
8861 #### Since
8862 0.1.0
8863 #### Arguments
8864 1. `[string='']` *(string)*: The string to escape.
8865
8866 #### Returns
8867 *(string)*: Returns the escaped string.
8868
8869 #### Example
8870 ```js
8871 _.escape('fred, barney, & pebbles');
8872 // => 'fred, barney, &amp; pebbles'
8873 ```
8874 * * *
8875
8876 <!-- /div -->
8877
8878 <!-- div -->
8879
8880 ### <a id="_escaperegexpstring"></a>`_.escapeRegExp([string=''])`
8881 <a href="#_escaperegexpstring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13602 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.escaperegexp "See the npm package")
8882
8883 Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
8884 "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
8885
8886 #### Since
8887 3.0.0
8888 #### Arguments
8889 1. `[string='']` *(string)*: The string to escape.
8890
8891 #### Returns
8892 *(string)*: Returns the escaped string.
8893
8894 #### Example
8895 ```js
8896 _.escapeRegExp('[lodash](https://lodash.com/)');
8897 // => '\[lodash\]\(https://lodash\.com/\)'
8898 ```
8899 * * *
8900
8901 <!-- /div -->
8902
8903 <!-- div -->
8904
8905 ### <a id="_kebabcasestring"></a>`_.kebabCase([string=''])`
8906 <a href="#_kebabcasestring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13630 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.kebabcase "See the npm package")
8907
8908 Converts `string` to
8909 [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
8910
8911 #### Since
8912 3.0.0
8913 #### Arguments
8914 1. `[string='']` *(string)*: The string to convert.
8915
8916 #### Returns
8917 *(string)*: Returns the kebab cased string.
8918
8919 #### Example
8920 ```js
8921 _.kebabCase('Foo Bar');
8922 // => 'foo-bar'
8923
8924 _.kebabCase('fooBar');
8925 // => 'foo-bar'
8926
8927 _.kebabCase('__FOO_BAR__');
8928 // => 'foo-bar'
8929 ```
8930 * * *
8931
8932 <!-- /div -->
8933
8934 <!-- div -->
8935
8936 ### <a id="_lowercasestring"></a>`_.lowerCase([string=''])`
8937 <a href="#_lowercasestring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13654 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.lowercase "See the npm package")
8938
8939 Converts `string`, as space separated words, to lower case.
8940
8941 #### Since
8942 4.0.0
8943 #### Arguments
8944 1. `[string='']` *(string)*: The string to convert.
8945
8946 #### Returns
8947 *(string)*: Returns the lower cased string.
8948
8949 #### Example
8950 ```js
8951 _.lowerCase('--Foo-Bar--');
8952 // => 'foo bar'
8953
8954 _.lowerCase('fooBar');
8955 // => 'foo bar'
8956
8957 _.lowerCase('__FOO_BAR__');
8958 // => 'foo bar'
8959 ```
8960 * * *
8961
8962 <!-- /div -->
8963
8964 <!-- div -->
8965
8966 ### <a id="_lowerfirststring"></a>`_.lowerFirst([string=''])`
8967 <a href="#_lowerfirststring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13675 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.lowerfirst "See the npm package")
8968
8969 Converts the first character of `string` to lower case.
8970
8971 #### Since
8972 4.0.0
8973 #### Arguments
8974 1. `[string='']` *(string)*: The string to convert.
8975
8976 #### Returns
8977 *(string)*: Returns the converted string.
8978
8979 #### Example
8980 ```js
8981 _.lowerFirst('Fred');
8982 // => 'fred'
8983
8984 _.lowerFirst('FRED');
8985 // => 'fRED'
8986 ```
8987 * * *
8988
8989 <!-- /div -->
8990
8991 <!-- div -->
8992
8993 ### <a id="_padstring-length0-chars"></a>`_.pad([string=''], [length=0], [chars=' '])`
8994 <a href="#_padstring-length0-chars">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13700 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.pad "See the npm package")
8995
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`.
8998
8999 #### Since
9000 3.0.0
9001 #### Arguments
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.
9005
9006 #### Returns
9007 *(string)*: Returns the padded string.
9008
9009 #### Example
9010 ```js
9011 _.pad('abc', 8);
9012 // => '  abc   '
9013
9014 _.pad('abc', 8, '_-');
9015 // => '_-abc_-_'
9016
9017 _.pad('abc', 3);
9018 // => 'abc'
9019 ```
9020 * * *
9021
9022 <!-- /div -->
9023
9024 <!-- div -->
9025
9026 ### <a id="_padendstring-length0-chars"></a>`_.padEnd([string=''], [length=0], [chars=' '])`
9027 <a href="#_padendstring-length0-chars">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13739 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.padend "See the npm package")
9028
9029 Pads `string` on the right side if it's shorter than `length`. Padding
9030 characters are truncated if they exceed `length`.
9031
9032 #### Since
9033 4.0.0
9034 #### Arguments
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.
9038
9039 #### Returns
9040 *(string)*: Returns the padded string.
9041
9042 #### Example
9043 ```js
9044 _.padEnd('abc', 6);
9045 // => 'abc   '
9046
9047 _.padEnd('abc', 6, '_-');
9048 // => 'abc_-_'
9049
9050 _.padEnd('abc', 3);
9051 // => 'abc'
9052 ```
9053 * * *
9054
9055 <!-- /div -->
9056
9057 <!-- div -->
9058
9059 ### <a id="_padstartstring-length0-chars"></a>`_.padStart([string=''], [length=0], [chars=' '])`
9060 <a href="#_padstartstring-length0-chars">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13772 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.padstart "See the npm package")
9061
9062 Pads `string` on the left side if it's shorter than `length`. Padding
9063 characters are truncated if they exceed `length`.
9064
9065 #### Since
9066 4.0.0
9067 #### Arguments
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.
9071
9072 #### Returns
9073 *(string)*: Returns the padded string.
9074
9075 #### Example
9076 ```js
9077 _.padStart('abc', 6);
9078 // => '   abc'
9079
9080 _.padStart('abc', 6, '_-');
9081 // => '_-_abc'
9082
9083 _.padStart('abc', 3);
9084 // => 'abc'
9085 ```
9086 * * *
9087
9088 <!-- /div -->
9089
9090 <!-- div -->
9091
9092 ### <a id="_parseintstring-radix10"></a>`_.parseInt(string, [radix=10])`
9093 <a href="#_parseintstring-radix10">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13806 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.parseint "See the npm package")
9094
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.
9098 <br>
9099 <br>
9100 **Note:** This method aligns with the
9101 [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
9102
9103 #### Since
9104 1.1.0
9105 #### Arguments
9106 1. `string` *(string)*: The string to convert.
9107 2. `[radix=10]` *(number)*: The radix to interpret `value` by.
9108
9109 #### Returns
9110 *(number)*: Returns the converted integer.
9111
9112 #### Example
9113 ```js
9114 _.parseInt('08');
9115 // => 8
9116
9117 _.map(['6', '08', '10'], _.parseInt);
9118 // => [6, 8, 10]
9119 ```
9120 * * *
9121
9122 <!-- /div -->
9123
9124 <!-- div -->
9125
9126 ### <a id="_repeatstring-n1"></a>`_.repeat([string=''], [n=1])`
9127 <a href="#_repeatstring-n1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13840 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.repeat "See the npm package")
9128
9129 Repeats the given string `n` times.
9130
9131 #### Since
9132 3.0.0
9133 #### Arguments
9134 1. `[string='']` *(string)*: The string to repeat.
9135 2. `[n=1]` *(number)*: The number of times to repeat the string.
9136
9137 #### Returns
9138 *(string)*: Returns the repeated string.
9139
9140 #### Example
9141 ```js
9142 _.repeat('*', 3);
9143 // => '***'
9144
9145 _.repeat('abc', 2);
9146 // => 'abcabc'
9147
9148 _.repeat('abc', 0);
9149 // => ''
9150 ```
9151 * * *
9152
9153 <!-- /div -->
9154
9155 <!-- div -->
9156
9157 ### <a id="_replacestring-pattern-replacement"></a>`_.replace([string=''], pattern, replacement)`
9158 <a href="#_replacestring-pattern-replacement">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13868 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.replace "See the npm package")
9159
9160 Replaces matches for `pattern` in `string` with `replacement`.
9161 <br>
9162 <br>
9163 **Note:** This method is based on
9164 [`String#replace`](https://mdn.io/String/replace).
9165
9166 #### Since
9167 4.0.0
9168 #### Arguments
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.
9172
9173 #### Returns
9174 *(string)*: Returns the modified string.
9175
9176 #### Example
9177 ```js
9178 _.replace('Hi Fred', 'Fred', 'Barney');
9179 // => 'Hi Barney'
9180 ```
9181 * * *
9182
9183 <!-- /div -->
9184
9185 <!-- div -->
9186
9187 ### <a id="_snakecasestring"></a>`_.snakeCase([string=''])`
9188 <a href="#_snakecasestring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13896 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.snakecase "See the npm package")
9189
9190 Converts `string` to
9191 [snake case](https://en.wikipedia.org/wiki/Snake_case).
9192
9193 #### Since
9194 3.0.0
9195 #### Arguments
9196 1. `[string='']` *(string)*: The string to convert.
9197
9198 #### Returns
9199 *(string)*: Returns the snake cased string.
9200
9201 #### Example
9202 ```js
9203 _.snakeCase('Foo Bar');
9204 // => 'foo_bar'
9205
9206 _.snakeCase('fooBar');
9207 // => 'foo_bar'
9208
9209 _.snakeCase('--FOO-BAR--');
9210 // => 'foo_bar'
9211 ```
9212 * * *
9213
9214 <!-- /div -->
9215
9216 <!-- div -->
9217
9218 ### <a id="_splitstring-separator-limit"></a>`_.split([string=''], separator, [limit])`
9219 <a href="#_splitstring-separator-limit">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13919 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.split "See the npm package")
9220
9221 Splits `string` by `separator`.
9222 <br>
9223 <br>
9224 **Note:** This method is based on
9225 [`String#split`](https://mdn.io/String/split).
9226
9227 #### Since
9228 4.0.0
9229 #### Arguments
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.
9233
9234 #### Returns
9235 *(Array)*: Returns the string segments.
9236
9237 #### Example
9238 ```js
9239 _.split('a-b-c', '-', 2);
9240 // => ['a', 'b']
9241 ```
9242 * * *
9243
9244 <!-- /div -->
9245
9246 <!-- div -->
9247
9248 ### <a id="_startcasestring"></a>`_.startCase([string=''])`
9249 <a href="#_startcasestring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13961 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.startcase "See the npm package")
9250
9251 Converts `string` to
9252 [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
9253
9254 #### Since
9255 3.1.0
9256 #### Arguments
9257 1. `[string='']` *(string)*: The string to convert.
9258
9259 #### Returns
9260 *(string)*: Returns the start cased string.
9261
9262 #### Example
9263 ```js
9264 _.startCase('--foo-bar--');
9265 // => 'Foo Bar'
9266
9267 _.startCase('fooBar');
9268 // => 'Foo Bar'
9269
9270 _.startCase('__FOO_BAR__');
9271 // => 'FOO BAR'
9272 ```
9273 * * *
9274
9275 <!-- /div -->
9276
9277 <!-- div -->
9278
9279 ### <a id="_startswithstring-target-position0"></a>`_.startsWith([string=''], [target], [position=0])`
9280 <a href="#_startswithstring-target-position0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L13988 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.startswith "See the npm package")
9281
9282 Checks if `string` starts with the given target string.
9283
9284 #### Since
9285 3.0.0
9286 #### Arguments
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.
9290
9291 #### Returns
9292 *(boolean)*: Returns `true` if `string` starts with `target`, else `false`.
9293
9294 #### Example
9295 ```js
9296 _.startsWith('abc', 'a');
9297 // => true
9298
9299 _.startsWith('abc', 'b');
9300 // => false
9301
9302 _.startsWith('abc', 'b', 1);
9303 // => true
9304 ```
9305 * * *
9306
9307 <!-- /div -->
9308
9309 <!-- div -->
9310
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> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14097 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.template "See the npm package")
9313
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.
9319 <br>
9320 <br>
9321 **Note:** In the development build `_.template` utilizes
9322 [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
9323 for easier debugging.
9324 <br>
9325 <br>
9326 For more information on precompiling templates see
9327 [lodash's custom builds documentation](https://lodash.com/custom-builds).
9328 <br>
9329 <br>
9330 For more information on Chrome extension sandboxes see
9331 [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
9332
9333 #### Since
9334 0.1.0
9335 #### Arguments
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.
9344
9345 #### Returns
9346 *(Function)*: Returns the compiled template function.
9347
9348 #### Example
9349 ```js
9350 // Use the "interpolate" delimiter to create a compiled template.
9351 var compiled = _.template('hello <%= user %>!');
9352 compiled({ 'user': 'fred' });
9353 // => 'hello fred!'
9354
9355 // Use the HTML "escape" delimiter to escape data property values.
9356 var compiled = _.template('<b><%- value %></b>');
9357 compiled({ 'value': '<script>' });
9358 // => '<b>&lt;script&gt;</b>'
9359
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>'
9364
9365 // Use the internal `print` function in "evaluate" delimiters.
9366 var compiled = _.template('<% print("hello " + user); %>!');
9367 compiled({ 'user': 'barney' });
9368 // => 'hello barney!'
9369
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!'
9374
9375 // Use backslashes to treat delimiters as plain text.
9376 var compiled = _.template('<%= "\\<%- value %\\>" %>');
9377 compiled({ 'value': 'ignored' });
9378 // => '<%- value %>'
9379
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>'
9385
9386 // Use the `sourceURL` option to specify a custom sourceURL for the template.
9387 var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
9388 compiled(data);
9389 // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
9390
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' });
9393 compiled.source;
9394 // => function(data) {
9395 //   var __t, __p = '';
9396 //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
9397 //   return __p;
9398 // }
9399
9400 // Use custom template delimiters.
9401 _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
9402 var compiled = _.template('hello {{ user }}!');
9403 compiled({ 'user': 'mustache' });
9404 // => 'hello mustache!'
9405
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'), '\
9409   var JST = {\
9410     "main": ' + _.template(mainText).source + '\
9411   };\
9412 ');
9413 ```
9414 * * *
9415
9416 <!-- /div -->
9417
9418 <!-- div -->
9419
9420 ### <a id="_tolowerstring"></a>`_.toLower([string=''])`
9421 <a href="#_tolowerstring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14226 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.tolower "See the npm package")
9422
9423 Converts `string`, as a whole, to lower case just like
9424 [String#toLowerCase](https://mdn.io/toLowerCase).
9425
9426 #### Since
9427 4.0.0
9428 #### Arguments
9429 1. `[string='']` *(string)*: The string to convert.
9430
9431 #### Returns
9432 *(string)*: Returns the lower cased string.
9433
9434 #### Example
9435 ```js
9436 _.toLower('--Foo-Bar--');
9437 // => '--foo-bar--'
9438
9439 _.toLower('fooBar');
9440 // => 'foobar'
9441
9442 _.toLower('__FOO_BAR__');
9443 // => '__foo_bar__'
9444 ```
9445 * * *
9446
9447 <!-- /div -->
9448
9449 <!-- div -->
9450
9451 ### <a id="_toupperstring"></a>`_.toUpper([string=''])`
9452 <a href="#_toupperstring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14251 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.toupper "See the npm package")
9453
9454 Converts `string`, as a whole, to upper case just like
9455 [String#toUpperCase](https://mdn.io/toUpperCase).
9456
9457 #### Since
9458 4.0.0
9459 #### Arguments
9460 1. `[string='']` *(string)*: The string to convert.
9461
9462 #### Returns
9463 *(string)*: Returns the upper cased string.
9464
9465 #### Example
9466 ```js
9467 _.toUpper('--foo-bar--');
9468 // => '--FOO-BAR--'
9469
9470 _.toUpper('fooBar');
9471 // => 'FOOBAR'
9472
9473 _.toUpper('__foo_bar__');
9474 // => '__FOO_BAR__'
9475 ```
9476 * * *
9477
9478 <!-- /div -->
9479
9480 <!-- div -->
9481
9482 ### <a id="_trimstring-charswhitespace"></a>`_.trim([string=''], [chars=whitespace])`
9483 <a href="#_trimstring-charswhitespace">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14277 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.trim "See the npm package")
9484
9485 Removes leading and trailing whitespace or specified characters from `string`.
9486
9487 #### Since
9488 3.0.0
9489 #### Arguments
9490 1. `[string='']` *(string)*: The string to trim.
9491 2. `[chars=whitespace]` *(string)*: The characters to trim.
9492
9493 #### Returns
9494 *(string)*: Returns the trimmed string.
9495
9496 #### Example
9497 ```js
9498 _.trim('  abc  ');
9499 // => 'abc'
9500
9501 _.trim('-_-abc-_-', '_-');
9502 // => 'abc'
9503
9504 _.map(['  foo  ', '  bar  '], _.trim);
9505 // => ['foo', 'bar']
9506 ```
9507 * * *
9508
9509 <!-- /div -->
9510
9511 <!-- div -->
9512
9513 ### <a id="_trimendstring-charswhitespace"></a>`_.trimEnd([string=''], [chars=whitespace])`
9514 <a href="#_trimendstring-charswhitespace">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14312 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.trimend "See the npm package")
9515
9516 Removes trailing whitespace or specified characters from `string`.
9517
9518 #### Since
9519 4.0.0
9520 #### Arguments
9521 1. `[string='']` *(string)*: The string to trim.
9522 2. `[chars=whitespace]` *(string)*: The characters to trim.
9523
9524 #### Returns
9525 *(string)*: Returns the trimmed string.
9526
9527 #### Example
9528 ```js
9529 _.trimEnd('  abc  ');
9530 // => '  abc'
9531
9532 _.trimEnd('-_-abc-_-', '_-');
9533 // => '-_-abc'
9534 ```
9535 * * *
9536
9537 <!-- /div -->
9538
9539 <!-- div -->
9540
9541 ### <a id="_trimstartstring-charswhitespace"></a>`_.trimStart([string=''], [chars=whitespace])`
9542 <a href="#_trimstartstring-charswhitespace">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14345 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.trimstart "See the npm package")
9543
9544 Removes leading whitespace or specified characters from `string`.
9545
9546 #### Since
9547 4.0.0
9548 #### Arguments
9549 1. `[string='']` *(string)*: The string to trim.
9550 2. `[chars=whitespace]` *(string)*: The characters to trim.
9551
9552 #### Returns
9553 *(string)*: Returns the trimmed string.
9554
9555 #### Example
9556 ```js
9557 _.trimStart('  abc  ');
9558 // => 'abc  '
9559
9560 _.trimStart('-_-abc-_-', '_-');
9561 // => 'abc-_-'
9562 ```
9563 * * *
9564
9565 <!-- /div -->
9566
9567 <!-- div -->
9568
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> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14396 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.truncate "See the npm package")
9571
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 "...".
9575
9576 #### Since
9577 4.0.0
9578 #### Arguments
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.
9584
9585 #### Returns
9586 *(string)*: Returns the truncated string.
9587
9588 #### Example
9589 ```js
9590 _.truncate('hi-diddly-ho there, neighborino');
9591 // => 'hi-diddly-ho there, neighbo...'
9592
9593 _.truncate('hi-diddly-ho there, neighborino', {
9594   'length': 24,
9595   'separator': ' '
9596 });
9597 // => 'hi-diddly-ho there,...'
9598
9599 _.truncate('hi-diddly-ho there, neighborino', {
9600   'length': 24,
9601   'separator': /,? +/
9602 });
9603 // => 'hi-diddly-ho there...'
9604
9605 _.truncate('hi-diddly-ho there, neighborino', {
9606   'omission': ' [...]'
9607 });
9608 // => 'hi-diddly-ho there, neig [...]'
9609 ```
9610 * * *
9611
9612 <!-- /div -->
9613
9614 <!-- div -->
9615
9616 ### <a id="_unescapestring"></a>`_.unescape([string=''])`
9617 <a href="#_unescapestring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14471 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.unescape "See the npm package")
9618
9619 The inverse of `_.escape`; this method converts the HTML entities
9620 `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;`, and `&#96;` in `string` to
9621 their corresponding characters.
9622 <br>
9623 <br>
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).
9626
9627 #### Since
9628 0.6.0
9629 #### Arguments
9630 1. `[string='']` *(string)*: The string to unescape.
9631
9632 #### Returns
9633 *(string)*: Returns the unescaped string.
9634
9635 #### Example
9636 ```js
9637 _.unescape('fred, barney, &amp; pebbles');
9638 // => 'fred, barney, & pebbles'
9639 ```
9640 * * *
9641
9642 <!-- /div -->
9643
9644 <!-- div -->
9645
9646 ### <a id="_uppercasestring"></a>`_.upperCase([string=''])`
9647 <a href="#_uppercasestring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14498 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.uppercase "See the npm package")
9648
9649 Converts `string`, as space separated words, to upper case.
9650
9651 #### Since
9652 4.0.0
9653 #### Arguments
9654 1. `[string='']` *(string)*: The string to convert.
9655
9656 #### Returns
9657 *(string)*: Returns the upper cased string.
9658
9659 #### Example
9660 ```js
9661 _.upperCase('--foo-bar');
9662 // => 'FOO BAR'
9663
9664 _.upperCase('fooBar');
9665 // => 'FOO BAR'
9666
9667 _.upperCase('__foo_bar__');
9668 // => 'FOO BAR'
9669 ```
9670 * * *
9671
9672 <!-- /div -->
9673
9674 <!-- div -->
9675
9676 ### <a id="_upperfirststring"></a>`_.upperFirst([string=''])`
9677 <a href="#_upperfirststring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14519 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.upperfirst "See the npm package")
9678
9679 Converts the first character of `string` to upper case.
9680
9681 #### Since
9682 4.0.0
9683 #### Arguments
9684 1. `[string='']` *(string)*: The string to convert.
9685
9686 #### Returns
9687 *(string)*: Returns the converted string.
9688
9689 #### Example
9690 ```js
9691 _.upperFirst('fred');
9692 // => 'Fred'
9693
9694 _.upperFirst('FRED');
9695 // => 'FRED'
9696 ```
9697 * * *
9698
9699 <!-- /div -->
9700
9701 <!-- div -->
9702
9703 ### <a id="_wordsstring-pattern"></a>`_.words([string=''], [pattern])`
9704 <a href="#_wordsstring-pattern">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14540 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.words "See the npm package")
9705
9706 Splits `string` into an array of its words.
9707
9708 #### Since
9709 3.0.0
9710 #### Arguments
9711 1. `[string='']` *(string)*: The string to inspect.
9712 2. `[pattern]` *(RegExp|string)*: The pattern to match words.
9713
9714 #### Returns
9715 *(Array)*: Returns the words of `string`.
9716
9717 #### Example
9718 ```js
9719 _.words('fred, barney, & pebbles');
9720 // => ['fred', 'barney', 'pebbles']
9721
9722 _.words('fred, barney, & pebbles', /[^, ]+/g);
9723 // => ['fred', 'barney', '&', 'pebbles']
9724 ```
9725 * * *
9726
9727 <!-- /div -->
9728
9729 <!-- /div -->
9730
9731 <!-- div -->
9732
9733 ## `“Util” Methods`
9734
9735 <!-- div -->
9736
9737 ### <a id="_attemptfunc-args"></a>`_.attempt(func, [args])`
9738 <a href="#_attemptfunc-args">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14574 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.attempt "See the npm package")
9739
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.
9742
9743 #### Since
9744 3.0.0
9745 #### Arguments
9746 1. `func` *(Function)*: The function to attempt.
9747 2. `[args]` *(...&#42;)*: The arguments to invoke `func` with.
9748
9749 #### Returns
9750 *(&#42;)*: Returns the `func` result or error object.
9751
9752 #### Example
9753 ```js
9754 // Avoid throwing errors for invalid selectors.
9755 var elements = _.attempt(function(selector) {
9756   return document.querySelectorAll(selector);
9757 }, '>_>');
9758
9759 if (_.isError(elements)) {
9760   elements = [];
9761 }
9762 ```
9763 * * *
9764
9765 <!-- /div -->
9766
9767 <!-- div -->
9768
9769 ### <a id="_bindallobject-methodnames"></a>`_.bindAll(object, methodNames)`
9770 <a href="#_bindallobject-methodnames">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14608 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.bindall "See the npm package")
9771
9772 Binds methods of an object to the object itself, overwriting the existing
9773 method.
9774 <br>
9775 <br>
9776 **Note:** This method doesn't set the "length" property of bound functions.
9777
9778 #### Since
9779 0.1.0
9780 #### Arguments
9781 1. `object` *(Object)*: The object to bind and assign the bound methods to.
9782 2. `methodNames` *(...(string|string&#91;&#93;))*: The object method names to bind.
9783
9784 #### Returns
9785 *(Object)*: Returns `object`.
9786
9787 #### Example
9788 ```js
9789 var view = {
9790   'label': 'docs',
9791   'onClick': function() {
9792     console.log('clicked ' + this.label);
9793   }
9794 };
9795
9796 _.bindAll(view, ['onClick']);
9797 jQuery(element).on('click', view.onClick);
9798 // => Logs 'clicked docs' when clicked.
9799 ```
9800 * * *
9801
9802 <!-- /div -->
9803
9804 <!-- div -->
9805
9806 ### <a id="_condpairs"></a>`_.cond(pairs)`
9807 <a href="#_condpairs">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14645 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.cond "See the npm package")
9808
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
9812 function.
9813
9814 #### Since
9815 4.0.0
9816 #### Arguments
9817 1. `pairs` *(Array)*: The predicate-function pairs.
9818
9819 #### Returns
9820 *(Function)*: Returns the new composite function.
9821
9822 #### Example
9823 ```js
9824 var func = _.cond([
9825   [_.matches({ 'a': 1 }),           _.constant('matches A')],
9826   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
9827   [_.constant(true),                _.constant('no match')]
9828 ]);
9829
9830 func({ 'a': 1, 'b': 2 });
9831 // => 'matches A'
9832
9833 func({ 'a': 0, 'b': 1 });
9834 // => 'matches B'
9835
9836 func({ 'a': '1', 'b': '2' });
9837 // => 'no match'
9838 ```
9839 * * *
9840
9841 <!-- /div -->
9842
9843 <!-- div -->
9844
9845 ### <a id="_conformssource"></a>`_.conforms(source)`
9846 <a href="#_conformssource">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14688 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.conforms "See the npm package")
9847
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`.
9851
9852 #### Since
9853 4.0.0
9854 #### Arguments
9855 1. `source` *(Object)*: The object of property predicates to conform to.
9856
9857 #### Returns
9858 *(Function)*: Returns the new spec function.
9859
9860 #### Example
9861 ```js
9862 var users = [
9863   { 'user': 'barney', 'age': 36 },
9864   { 'user': 'fred',   'age': 40 }
9865 ];
9866
9867 _.filter(users, _.conforms({ 'age': function(n) { return n > 38; } }));
9868 // => [{ 'user': 'fred', 'age': 40 }]
9869 ```
9870 * * *
9871
9872 <!-- /div -->
9873
9874 <!-- div -->
9875
9876 ### <a id="_constantvalue"></a>`_.constant(value)`
9877 <a href="#_constantvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14711 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.constant "See the npm package")
9878
9879 Creates a function that returns `value`.
9880
9881 #### Since
9882 2.4.0
9883 #### Arguments
9884 1. `value` *(&#42;)*: The value to return from the new function.
9885
9886 #### Returns
9887 *(Function)*: Returns the new constant function.
9888
9889 #### Example
9890 ```js
9891 var objects = _.times(2, _.constant({ 'a': 1 }));
9892
9893 console.log(objects);
9894 // => [{ 'a': 1 }, { 'a': 1 }]
9895
9896 console.log(objects[0] === objects[1]);
9897 // => true
9898 ```
9899 * * *
9900
9901 <!-- /div -->
9902
9903 <!-- div -->
9904
9905 ### <a id="_flowfuncs"></a>`_.flow([funcs])`
9906 <a href="#_flowfuncs">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14739 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.flow "See the npm package")
9907
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.
9911
9912 #### Since
9913 3.0.0
9914 #### Arguments
9915 1. `[funcs]` *(...(Function|Function&#91;&#93;))*: Functions to invoke.
9916
9917 #### Returns
9918 *(Function)*: Returns the new composite function.
9919
9920 #### Example
9921 ```js
9922 function square(n) {
9923   return n * n;
9924 }
9925
9926 var addSquare = _.flow([_.add, square]);
9927 addSquare(1, 2);
9928 // => 9
9929 ```
9930 * * *
9931
9932 <!-- /div -->
9933
9934 <!-- div -->
9935
9936 ### <a id="_flowrightfuncs"></a>`_.flowRight([funcs])`
9937 <a href="#_flowrightfuncs">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14762 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.flowright "See the npm package")
9938
9939 This method is like `_.flow` except that it creates a function that
9940 invokes the given functions from right to left.
9941
9942 #### Since
9943 3.0.0
9944 #### Arguments
9945 1. `[funcs]` *(...(Function|Function&#91;&#93;))*: Functions to invoke.
9946
9947 #### Returns
9948 *(Function)*: Returns the new composite function.
9949
9950 #### Example
9951 ```js
9952 function square(n) {
9953   return n * n;
9954 }
9955
9956 var addSquare = _.flowRight([square, _.add]);
9957 addSquare(1, 2);
9958 // => 9
9959 ```
9960 * * *
9961
9962 <!-- /div -->
9963
9964 <!-- div -->
9965
9966 ### <a id="_identityvalue"></a>`_.identity(value)`
9967 <a href="#_identityvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14780 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.identity "See the npm package")
9968
9969 This method returns the first argument given to it.
9970
9971 #### Since
9972 0.1.0
9973 #### Arguments
9974 1. `value` *(&#42;)*: Any value.
9975
9976 #### Returns
9977 *(&#42;)*: Returns `value`.
9978
9979 #### Example
9980 ```js
9981 var object = { 'user': 'fred' };
9982
9983 console.log(_.identity(object) === object);
9984 // => true
9985 ```
9986 * * *
9987
9988 <!-- /div -->
9989
9990 <!-- div -->
9991
9992 ### <a id="_iterateefunc_identity"></a>`_.iteratee([func=_.identity])`
9993 <a href="#_iterateefunc_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14826 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.iteratee "See the npm package")
9994
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`.
10000
10001 #### Since
10002 4.0.0
10003 #### Arguments
10004 1. `[func=_.identity]` *(&#42;)*: The value to convert to a callback.
10005
10006 #### Returns
10007 *(Function)*: Returns the callback.
10008
10009 #### Example
10010 ```js
10011 var users = [
10012   { 'user': 'barney', 'age': 36, 'active': true },
10013   { 'user': 'fred',   'age': 40, 'active': false }
10014 ];
10015
10016 // The `_.matches` iteratee shorthand.
10017 _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
10018 // => [{ 'user': 'barney', 'age': 36, 'active': true }]
10019
10020 // The `_.matchesProperty` iteratee shorthand.
10021 _.filter(users, _.iteratee(['user', 'fred']));
10022 // => [{ 'user': 'fred', 'age': 40 }]
10023
10024 // The `_.property` iteratee shorthand.
10025 _.map(users, _.iteratee('user'));
10026 // => ['barney', 'fred']
10027
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);
10032   };
10033 });
10034
10035 _.filter(['abc', 'def'], /ef/);
10036 // => ['def']
10037 ```
10038 * * *
10039
10040 <!-- /div -->
10041
10042 <!-- div -->
10043
10044 ### <a id="_matchessource"></a>`_.matches(source)`
10045 <a href="#_matchessource">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14854 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.matches "See the npm package")
10046
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.
10051 <br>
10052 <br>
10053 **Note:** This method supports comparing the same values as `_.isEqual`.
10054
10055 #### Since
10056 3.0.0
10057 #### Arguments
10058 1. `source` *(Object)*: The object of property values to match.
10059
10060 #### Returns
10061 *(Function)*: Returns the new spec function.
10062
10063 #### Example
10064 ```js
10065 var users = [
10066   { 'user': 'barney', 'age': 36, 'active': true },
10067   { 'user': 'fred',   'age': 40, 'active': false }
10068 ];
10069
10070 _.filter(users, _.matches({ 'age': 40, 'active': false }));
10071 // => [{ 'user': 'fred', 'age': 40, 'active': false }]
10072 ```
10073 * * *
10074
10075 <!-- /div -->
10076
10077 <!-- div -->
10078
10079 ### <a id="_matchespropertypath-srcvalue"></a>`_.matchesProperty(path, srcValue)`
10080 <a href="#_matchespropertypath-srcvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14882 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.matchesproperty "See the npm package")
10081
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`.
10085 <br>
10086 <br>
10087 **Note:** This method supports comparing the same values as `_.isEqual`.
10088
10089 #### Since
10090 3.2.0
10091 #### Arguments
10092 1. `path` *(Array|string)*: The path of the property to get.
10093 2. `srcValue` *(&#42;)*: The value to match.
10094
10095 #### Returns
10096 *(Function)*: Returns the new spec function.
10097
10098 #### Example
10099 ```js
10100 var users = [
10101   { 'user': 'barney' },
10102   { 'user': 'fred' }
10103 ];
10104
10105 _.find(users, _.matchesProperty('user', 'fred'));
10106 // => { 'user': 'fred' }
10107 ```
10108 * * *
10109
10110 <!-- /div -->
10111
10112 <!-- div -->
10113
10114 ### <a id="_methodpath-args"></a>`_.method(path, [args])`
10115 <a href="#_methodpath-args">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14910 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.method "See the npm package")
10116
10117 Creates a function that invokes the method at `path` of a given object.
10118 Any additional arguments are provided to the invoked method.
10119
10120 #### Since
10121 3.7.0
10122 #### Arguments
10123 1. `path` *(Array|string)*: The path of the method to invoke.
10124 2. `[args]` *(...&#42;)*: The arguments to invoke the method with.
10125
10126 #### Returns
10127 *(Function)*: Returns the new invoker function.
10128
10129 #### Example
10130 ```js
10131 var objects = [
10132   { 'a': { 'b': _.constant(2) } },
10133   { 'a': { 'b': _.constant(1) } }
10134 ];
10135
10136 _.map(objects, _.method('a.b'));
10137 // => [2, 1]
10138
10139 _.map(objects, _.method(['a', 'b']));
10140 // => [2, 1]
10141 ```
10142 * * *
10143
10144 <!-- /div -->
10145
10146 <!-- div -->
10147
10148 ### <a id="_methodofobject-args"></a>`_.methodOf(object, [args])`
10149 <a href="#_methodofobject-args">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14939 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.methodof "See the npm package")
10150
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.
10154
10155 #### Since
10156 3.7.0
10157 #### Arguments
10158 1. `object` *(Object)*: The object to query.
10159 2. `[args]` *(...&#42;)*: The arguments to invoke the method with.
10160
10161 #### Returns
10162 *(Function)*: Returns the new invoker function.
10163
10164 #### Example
10165 ```js
10166 var array = _.times(3, _.constant),
10167     object = { 'a': array, 'b': array, 'c': array };
10168
10169 _.map(['a[2]', 'c[0]'], _.methodOf(object));
10170 // => [2, 0]
10171
10172 _.map([['a', '2'], ['c', '0']], _.methodOf(object));
10173 // => [2, 0]
10174 ```
10175 * * *
10176
10177 <!-- /div -->
10178
10179 <!-- div -->
10180
10181 ### <a id="_mixinobjectlodash-source-options-optionschaintrue"></a>`_.mixin([object=lodash], source, [options={}], [options.chain=true])`
10182 <a href="#_mixinobjectlodash-source-options-optionschaintrue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L14981 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.mixin "See the npm package")
10183
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.
10187 <br>
10188 <br>
10189 **Note:** Use `_.runInContext` to create a pristine `lodash` function to
10190 avoid conflicts caused by modifying the original.
10191
10192 #### Since
10193 0.1.0
10194 #### Arguments
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.
10199
10200 #### Returns
10201 *(&#42;)*: Returns `object`.
10202
10203 #### Example
10204 ```js
10205 function vowels(string) {
10206   return _.filter(string, function(v) {
10207     return /[aeiou]/i.test(v);
10208   });
10209 }
10210
10211 _.mixin({ 'vowels': vowels });
10212 _.vowels('fred');
10213 // => ['e']
10214
10215 _('fred').vowels().value();
10216 // => ['e']
10217
10218 _.mixin({ 'vowels': vowels }, { 'chain': false });
10219 _('fred').vowels();
10220 // => ['e']
10221 ```
10222 * * *
10223
10224 <!-- /div -->
10225
10226 <!-- div -->
10227
10228 ### <a id="_noconflict"></a>`_.noConflict()`
10229 <a href="#_noconflict">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15030 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.noconflict "See the npm package")
10230
10231 Reverts the `_` variable to its previous value and returns a reference to
10232 the `lodash` function.
10233
10234 #### Since
10235 0.1.0
10236 #### Returns
10237 *(Function)*: Returns the `lodash` function.
10238
10239 #### Example
10240 ```js
10241 var lodash = _.noConflict();
10242 ```
10243 * * *
10244
10245 <!-- /div -->
10246
10247 <!-- div -->
10248
10249 ### <a id="_noop"></a>`_.noop()`
10250 <a href="#_noop">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15049 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.noop "See the npm package")
10251
10252 A method that returns `undefined`.
10253
10254 #### Since
10255 2.3.0
10256 #### Example
10257 ```js
10258 _.times(2, _.noop);
10259 // => [undefined, undefined]
10260 ```
10261 * * *
10262
10263 <!-- /div -->
10264
10265 <!-- div -->
10266
10267 ### <a id="_nthargn0"></a>`_.nthArg([n=0])`
10268 <a href="#_nthargn0">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15073 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.ntharg "See the npm package")
10269
10270 Creates a function that gets the argument at index `n`. If `n` is negative,
10271 the nth argument from the end is returned.
10272
10273 #### Since
10274 4.0.0
10275 #### Arguments
10276 1. `[n=0]` *(number)*: The index of the argument to return.
10277
10278 #### Returns
10279 *(Function)*: Returns the new pass-thru function.
10280
10281 #### Example
10282 ```js
10283 var func = _.nthArg(1);
10284 func('a', 'b', 'c', 'd');
10285 // => 'b'
10286
10287 var func = _.nthArg(-2);
10288 func('a', 'b', 'c', 'd');
10289 // => 'c'
10290 ```
10291 * * *
10292
10293 <!-- /div -->
10294
10295 <!-- div -->
10296
10297 ### <a id="_overiteratees_identity"></a>`_.over([iteratees=[_.identity]])`
10298 <a href="#_overiteratees_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15098 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.over "See the npm package")
10299
10300 Creates a function that invokes `iteratees` with the arguments it receives
10301 and returns their results.
10302
10303 #### Since
10304 4.0.0
10305 #### Arguments
10306 1. `[iteratees=[_.identity]]` *(...(Array|Array&#91;&#93;|Function|Function&#91;&#93;|Object|Object&#91;&#93;|string|string&#91;&#93;))*: The iteratees to invoke.
10307
10308 #### Returns
10309 *(Function)*: Returns the new function.
10310
10311 #### Example
10312 ```js
10313 var func = _.over([Math.max, Math.min]);
10314
10315 func(1, 2, 3, 4);
10316 // => [4, 1]
10317 ```
10318 * * *
10319
10320 <!-- /div -->
10321
10322 <!-- div -->
10323
10324 ### <a id="_overeverypredicates_identity"></a>`_.overEvery([predicates=[_.identity]])`
10325 <a href="#_overeverypredicates_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15124 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.overevery "See the npm package")
10326
10327 Creates a function that checks if **all** of the `predicates` return
10328 truthy when invoked with the arguments it receives.
10329
10330 #### Since
10331 4.0.0
10332 #### Arguments
10333 1. `[predicates=[_.identity]]` *(...(Array|Array&#91;&#93;|Function|Function&#91;&#93;|Object|Object&#91;&#93;|string|string&#91;&#93;))*: The predicates to check.
10334
10335 #### Returns
10336 *(Function)*: Returns the new function.
10337
10338 #### Example
10339 ```js
10340 var func = _.overEvery([Boolean, isFinite]);
10341
10342 func('1');
10343 // => true
10344
10345 func(null);
10346 // => false
10347
10348 func(NaN);
10349 // => false
10350 ```
10351 * * *
10352
10353 <!-- /div -->
10354
10355 <!-- div -->
10356
10357 ### <a id="_oversomepredicates_identity"></a>`_.overSome([predicates=[_.identity]])`
10358 <a href="#_oversomepredicates_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15150 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.oversome "See the npm package")
10359
10360 Creates a function that checks if **any** of the `predicates` return
10361 truthy when invoked with the arguments it receives.
10362
10363 #### Since
10364 4.0.0
10365 #### Arguments
10366 1. `[predicates=[_.identity]]` *(...(Array|Array&#91;&#93;|Function|Function&#91;&#93;|Object|Object&#91;&#93;|string|string&#91;&#93;))*: The predicates to check.
10367
10368 #### Returns
10369 *(Function)*: Returns the new function.
10370
10371 #### Example
10372 ```js
10373 var func = _.overSome([Boolean, isFinite]);
10374
10375 func('1');
10376 // => true
10377
10378 func(null);
10379 // => true
10380
10381 func(NaN);
10382 // => false
10383 ```
10384 * * *
10385
10386 <!-- /div -->
10387
10388 <!-- div -->
10389
10390 ### <a id="_propertypath"></a>`_.property(path)`
10391 <a href="#_propertypath">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15174 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.property "See the npm package")
10392
10393 Creates a function that returns the value at `path` of a given object.
10394
10395 #### Since
10396 2.4.0
10397 #### Arguments
10398 1. `path` *(Array|string)*: The path of the property to get.
10399
10400 #### Returns
10401 *(Function)*: Returns the new accessor function.
10402
10403 #### Example
10404 ```js
10405 var objects = [
10406   { 'a': { 'b': 2 } },
10407   { 'a': { 'b': 1 } }
10408 ];
10409
10410 _.map(objects, _.property('a.b'));
10411 // => [2, 1]
10412
10413 _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
10414 // => [1, 2]
10415 ```
10416 * * *
10417
10418 <!-- /div -->
10419
10420 <!-- div -->
10421
10422 ### <a id="_propertyofobject"></a>`_.propertyOf(object)`
10423 <a href="#_propertyofobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15199 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.propertyof "See the npm package")
10424
10425 The opposite of `_.property`; this method creates a function that returns
10426 the value at a given path of `object`.
10427
10428 #### Since
10429 3.0.0
10430 #### Arguments
10431 1. `object` *(Object)*: The object to query.
10432
10433 #### Returns
10434 *(Function)*: Returns the new accessor function.
10435
10436 #### Example
10437 ```js
10438 var array = [0, 1, 2],
10439     object = { 'a': array, 'b': array, 'c': array };
10440
10441 _.map(['a[2]', 'c[0]'], _.propertyOf(object));
10442 // => [2, 0]
10443
10444 _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
10445 // => [2, 0]
10446 ```
10447 * * *
10448
10449 <!-- /div -->
10450
10451 <!-- div -->
10452
10453 ### <a id="_rangestart0-end-step1"></a>`_.range([start=0], end, [step=1])`
10454 <a href="#_rangestart0-end-step1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15246 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.range "See the npm package")
10455
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`.
10460 <br>
10461 <br>
10462 **Note:** JavaScript follows the IEEE-754 standard for resolving
10463 floating-point values which can produce unexpected results.
10464
10465 #### Since
10466 0.1.0
10467 #### Arguments
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.
10471
10472 #### Returns
10473 *(Array)*: Returns the range of numbers.
10474
10475 #### Example
10476 ```js
10477 _.range(4);
10478 // => [0, 1, 2, 3]
10479
10480 _.range(-4);
10481 // => [0, -1, -2, -3]
10482
10483 _.range(1, 5);
10484 // => [1, 2, 3, 4]
10485
10486 _.range(0, 20, 5);
10487 // => [0, 5, 10, 15]
10488
10489 _.range(0, -4, -1);
10490 // => [0, -1, -2, -3]
10491
10492 _.range(1, 4, 0);
10493 // => [1, 1, 1]
10494
10495 _.range(0);
10496 // => []
10497 ```
10498 * * *
10499
10500 <!-- /div -->
10501
10502 <!-- div -->
10503
10504 ### <a id="_rangerightstart0-end-step1"></a>`_.rangeRight([start=0], end, [step=1])`
10505 <a href="#_rangerightstart0-end-step1">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15284 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.rangeright "See the npm package")
10506
10507 This method is like `_.range` except that it populates values in
10508 descending order.
10509
10510 #### Since
10511 4.0.0
10512 #### Arguments
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.
10516
10517 #### Returns
10518 *(Array)*: Returns the range of numbers.
10519
10520 #### Example
10521 ```js
10522 _.rangeRight(4);
10523 // => [3, 2, 1, 0]
10524
10525 _.rangeRight(-4);
10526 // => [-3, -2, -1, 0]
10527
10528 _.rangeRight(1, 5);
10529 // => [4, 3, 2, 1]
10530
10531 _.rangeRight(0, 20, 5);
10532 // => [15, 10, 5, 0]
10533
10534 _.rangeRight(0, -4, -1);
10535 // => [-3, -2, -1, 0]
10536
10537 _.rangeRight(1, 4, 0);
10538 // => [1, 1, 1]
10539
10540 _.rangeRight(0);
10541 // => []
10542 ```
10543 * * *
10544
10545 <!-- /div -->
10546
10547 <!-- div -->
10548
10549 ### <a id="_runincontextcontextroot"></a>`_.runInContext([context=root])`
10550 <a href="#_runincontextcontextroot">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1234 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.runincontext "See the npm package")
10551
10552 Create a new pristine `lodash` function using the `context` object.
10553
10554 #### Since
10555 1.1.0
10556 #### Arguments
10557 1. `[context=root]` *(Object)*: The context object.
10558
10559 #### Returns
10560 *(Function)*: Returns a new `lodash` function.
10561
10562 #### Example
10563 ```js
10564 _.mixin({ 'foo': _.constant('foo') });
10565
10566 var lodash = _.runInContext();
10567 lodash.mixin({ 'bar': lodash.constant('bar') });
10568
10569 _.isFunction(_.foo);
10570 // => true
10571 _.isFunction(_.bar);
10572 // => false
10573
10574 lodash.isFunction(lodash.foo);
10575 // => false
10576 lodash.isFunction(lodash.bar);
10577 // => true
10578
10579 // Use `context` to stub `Date#getTime` use in `_.now`.
10580 var stubbed = _.runInContext({
10581   'Date': function() {
10582     return { 'getTime': stubGetTime };
10583   }
10584 });
10585
10586 // Create a suped-up `defer` in Node.js.
10587 var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
10588 ```
10589 * * *
10590
10591 <!-- /div -->
10592
10593 <!-- div -->
10594
10595 ### <a id="_stubarray"></a>`_.stubArray()`
10596 <a href="#_stubarray">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15304 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.stubarray "See the npm package")
10597
10598 A method that returns a new empty array.
10599
10600 #### Since
10601 4.13.0
10602 #### Returns
10603 *(Array)*: Returns the new empty array.
10604
10605 #### Example
10606 ```js
10607 var arrays = _.times(2, _.stubArray);
10608
10609 console.log(arrays);
10610 // => [[], []]
10611
10612 console.log(arrays[0] === arrays[1]);
10613 // => false
10614 ```
10615 * * *
10616
10617 <!-- /div -->
10618
10619 <!-- div -->
10620
10621 ### <a id="_stubfalse"></a>`_.stubFalse()`
10622 <a href="#_stubfalse">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15321 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.stubfalse "See the npm package")
10623
10624 A method that returns `false`.
10625
10626 #### Since
10627 4.13.0
10628 #### Returns
10629 *(boolean)*: Returns `false`.
10630
10631 #### Example
10632 ```js
10633 _.times(2, _.stubFalse);
10634 // => [false, false]
10635 ```
10636 * * *
10637
10638 <!-- /div -->
10639
10640 <!-- div -->
10641
10642 ### <a id="_stubobject"></a>`_.stubObject()`
10643 <a href="#_stubobject">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15343 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.stubobject "See the npm package")
10644
10645 A method that returns a new empty object.
10646
10647 #### Since
10648 4.13.0
10649 #### Returns
10650 *(Object)*: Returns the new empty object.
10651
10652 #### Example
10653 ```js
10654 var objects = _.times(2, _.stubObject);
10655
10656 console.log(objects);
10657 // => [{}, {}]
10658
10659 console.log(objects[0] === objects[1]);
10660 // => false
10661 ```
10662 * * *
10663
10664 <!-- /div -->
10665
10666 <!-- div -->
10667
10668 ### <a id="_stubstring"></a>`_.stubString()`
10669 <a href="#_stubstring">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15360 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.stubstring "See the npm package")
10670
10671 A method that returns an empty string.
10672
10673 #### Since
10674 4.13.0
10675 #### Returns
10676 *(string)*: Returns the empty string.
10677
10678 #### Example
10679 ```js
10680 _.times(2, _.stubString);
10681 // => ['', '']
10682 ```
10683 * * *
10684
10685 <!-- /div -->
10686
10687 <!-- div -->
10688
10689 ### <a id="_stubtrue"></a>`_.stubTrue()`
10690 <a href="#_stubtrue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15377 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.stubtrue "See the npm package")
10691
10692 A method that returns `true`.
10693
10694 #### Since
10695 4.13.0
10696 #### Returns
10697 *(boolean)*: Returns `true`.
10698
10699 #### Example
10700 ```js
10701 _.times(2, _.stubTrue);
10702 // => [true, true]
10703 ```
10704 * * *
10705
10706 <!-- /div -->
10707
10708 <!-- div -->
10709
10710 ### <a id="_timesn-iteratee_identity"></a>`_.times(n, [iteratee=_.identity])`
10711 <a href="#_timesn-iteratee_identity">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15400 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.times "See the npm package")
10712
10713 Invokes the iteratee `n` times, returning an array of the results of
10714 each invocation. The iteratee is invoked with one argument; *(index)*.
10715
10716 #### Since
10717 0.1.0
10718 #### Arguments
10719 1. `n` *(number)*: The number of times to invoke `iteratee`.
10720 2. `[iteratee=_.identity]` *(Function)*: The function invoked per iteration.
10721
10722 #### Returns
10723 *(Array)*: Returns the array of results.
10724
10725 #### Example
10726 ```js
10727 _.times(3, String);
10728 // => ['0', '1', '2']
10729
10730  _.times(4, _.constant(0));
10731 // => [0, 0, 0, 0]
10732 ```
10733 * * *
10734
10735 <!-- /div -->
10736
10737 <!-- div -->
10738
10739 ### <a id="_topathvalue"></a>`_.toPath(value)`
10740 <a href="#_topathvalue">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15435 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.topath "See the npm package")
10741
10742 Converts `value` to a property path array.
10743
10744 #### Since
10745 4.0.0
10746 #### Arguments
10747 1. `value` *(&#42;)*: The value to convert.
10748
10749 #### Returns
10750 *(Array)*: Returns the new property path array.
10751
10752 #### Example
10753 ```js
10754 _.toPath('a.b.c');
10755 // => ['a', 'b', 'c']
10756
10757 _.toPath('a[0].b.c');
10758 // => ['a', '0', 'b', 'c']
10759 ```
10760 * * *
10761
10762 <!-- /div -->
10763
10764 <!-- div -->
10765
10766 ### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix=''])`
10767 <a href="#_uniqueidprefix">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L15459 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.uniqueid "See the npm package")
10768
10769 Generates a unique ID. If `prefix` is given, the ID is appended to it.
10770
10771 #### Since
10772 0.1.0
10773 #### Arguments
10774 1. `[prefix='']` *(string)*: The value to prefix the ID with.
10775
10776 #### Returns
10777 *(string)*: Returns the unique ID.
10778
10779 #### Example
10780 ```js
10781 _.uniqueId('contact_');
10782 // => 'contact_104'
10783
10784 _.uniqueId();
10785 // => '105'
10786 ```
10787 * * *
10788
10789 <!-- /div -->
10790
10791 <!-- /div -->
10792
10793 <!-- div -->
10794
10795 ## `Properties`
10796
10797 <!-- div -->
10798
10799 ### <a id="_version"></a>`_.VERSION`
10800 <a href="#_version">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L16152 "View in source") [&#x24C9;][1]
10801
10802 (string): The semantic version number.
10803
10804 * * *
10805
10806 <!-- /div -->
10807
10808 <!-- div -->
10809
10810 ### <a id="_templatesettings"></a>`_.templateSettings`
10811 <a href="#_templatesettings">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1509 "View in source") [&#x24C9;][1] [&#x24C3;](https://www.npmjs.com/package/lodash.templatesettings "See the npm package")
10812
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.
10816
10817 * * *
10818
10819 <!-- /div -->
10820
10821 <!-- div -->
10822
10823 ### <a id="_templatesettingsescape"></a>`_.templateSettings.escape`
10824 <a href="#_templatesettingsescape">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1517 "View in source") [&#x24C9;][1]
10825
10826 (RegExp): Used to detect `data` property values to be HTML-escaped.
10827
10828 * * *
10829
10830 <!-- /div -->
10831
10832 <!-- div -->
10833
10834 ### <a id="_templatesettingsevaluate"></a>`_.templateSettings.evaluate`
10835 <a href="#_templatesettingsevaluate">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1525 "View in source") [&#x24C9;][1]
10836
10837 (RegExp): Used to detect code to be evaluated.
10838
10839 * * *
10840
10841 <!-- /div -->
10842
10843 <!-- div -->
10844
10845 ### <a id="_templatesettingsimports"></a>`_.templateSettings.imports`
10846 <a href="#_templatesettingsimports">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1549 "View in source") [&#x24C9;][1]
10847
10848 (Object): Used to import variables into the compiled template.
10849
10850 * * *
10851
10852 <!-- /div -->
10853
10854 <!-- div -->
10855
10856 ### <a id="_templatesettingsinterpolate"></a>`_.templateSettings.interpolate`
10857 <a href="#_templatesettingsinterpolate">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1533 "View in source") [&#x24C9;][1]
10858
10859 (RegExp): Used to detect `data` property values to inject.
10860
10861 * * *
10862
10863 <!-- /div -->
10864
10865 <!-- div -->
10866
10867 ### <a id="_templatesettingsvariable"></a>`_.templateSettings.variable`
10868 <a href="#_templatesettingsvariable">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1541 "View in source") [&#x24C9;][1]
10869
10870 (string): Used to reference the data object in the template text.
10871
10872 * * *
10873
10874 <!-- /div -->
10875
10876 <!-- /div -->
10877
10878 <!-- div -->
10879
10880 ## `Methods`
10881
10882 <!-- div -->
10883
10884 ### <a id="_templatesettingsimports_"></a>`_.templateSettings.imports._`
10885 <a href="#_templatesettingsimports_">#</a> [&#x24C8;](https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L1557 "View in source") [&#x24C9;][1]
10886
10887 A reference to the `lodash` function.
10888
10889 * * *
10890
10891 <!-- /div -->
10892
10893 <!-- /div -->
10894
10895 <!-- /div -->
10896
10897  [1]: #array "Jump back to the TOC."