_.round

_.round(number, [precision=0]) source npm package Computes number rounded to precision. Since 3.10.0 Arguments number (number): The number to round. [precision=0] (number): The precision to round to. Returns (number): Returns the rounded number. Example _.round(4.006); // => 4   _.round(4.006, 2); // => 4.01   _.round(4060, -2); // => 4100

_.attempt

_.attempt(func, [args]) source npm package Attempts to invoke func, returning either the result or the caught error object. Any additional arguments are provided to func when it's invoked. Since 3.0.0 Arguments func (Function): The function to attempt. [args] (...*): The arguments to invoke func with. Returns (*): Returns the func result or error object. Example // Avoid throwing errors for invalid selectors. var elements = _.attempt(function(selector) {   return document.querySelectorAl

_.includes

_.includes(collection, value, [fromIndex=0]) source npm package Checks if value is in collection. If collection is a string, it's checked for a substring of value, otherwise SameValueZero is used for equality comparisons. If fromIndex is negative, it's used as the offset from the end of collection. Since 0.1.0 Arguments collection (Array|Object|string): The collection to inspect. value (*): The value to search for. [fromIndex=0] (number): The index to search from. Returns (boolean): Retu

_.result

_.result(object, path, [defaultValue]) source npm package This method is like _.get except that if the resolved value is a function it's invoked with the this binding of its parent object and its result is returned. Since 0.1.0 Arguments object (Object): The object to query. path (Array|string): The path of the property to resolve. [defaultValue] (*): The value returned for undefined resolved values. Returns (*): Returns the resolved value. Example var object = { 'a': [{ 'b': { 'c1': 3, 

_.escape

_.escape([string='']) source npm package Converts the characters "&", "<", ">", '"', and "'" in string to their corresponding HTML entities.Note: No other characters are escaped. To escape additional characters use a third-party library like he.Though the ">" character is escaped for symmetry, characters like ">" and "/" don't need escaping in HTML and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens's article (under "semi-re

_.overEvery

_.overEvery([predicates=[_.identity]]) source npm package Creates a function that checks if all of the predicates return truthy when invoked with the arguments it receives. Since 4.0.0 Arguments [predicates=[_.identity]] (...(Function|Function[])): The predicates to check. Returns (Function): Returns the new function. Example var func = _.overEvery([Boolean, isFinite]);   func('1'); // => true   func(null); // => false   func(NaN); // => false

_.partial

_.partial(func, [partials]) source npm package Creates a function that invokes func with partials prepended to the arguments it receives. This method is like _.bind except it does not alter the this binding.The _.partial.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for partially applied arguments.Note: This method doesn't set the "length" property of partially applied functions. Since 0.2.0 Arguments func (Function): The function to partially appl

_.prototype.chain

_.prototype.chain() source Creates a lodash wrapper instance with explicit method chain sequences enabled. Since 0.1.0 Returns (Object): Returns the new lodash wrapper instance. Example var users = [   { 'user': 'barney', 'age': 36 },   { 'user': 'fred',   'age': 40 } ];   // A sequence without explicit chaining. _(users).head(); // => { 'user': 'barney', 'age': 36 }   // A sequence with explicit chaining. _(users)   .chain()   .head()   .pick('user')   .value(); // => { 'user': 'barne

_.compact

_.compact(array) source npm package Creates an array with all falsey values removed. The values false, null, 0, "", undefined, and NaN are falsey. Since 0.1.0 Arguments array (Array): The array to compact. Returns (Array): Returns the new array of filtered values. Example _.compact([0, 1, false, 2, '', 3]); // => [1, 2, 3]

_.sample

_.sample(collection) source npm package Gets a random element from collection. Since 2.0.0 Arguments collection (Array|Object): The collection to sample. Returns (*): Returns the random element. Example _.sample([1, 2, 3, 4]); // => 2