_.sampleSize

_.sampleSize(collection, [n=1]) source npm package Gets n random elements at unique keys from collection up to the size of collection. Since 4.0.0 Arguments collection (Array|Object): The collection to sample. [n=1] (number): The number of elements to sample. Returns (Array): Returns the random elements. Example _.sampleSize([1, 2, 3], 2); // => [3, 1]   _.sampleSize([1, 2, 3], 4); // => [2, 3, 1]

_.maxBy

_.maxBy(array, [iteratee=_.identity]) source npm package This method is like _.max except that it accepts iteratee which is invoked for each element in array to generate the criterion by which the value is ranked. The iteratee is invoked with one argument: (value). Since 4.0.0 Arguments array (Array): The array to iterate over. [iteratee=_.identity] (Function): The iteratee invoked per element. Returns (*): Returns the maximum value. Example var objects = [{ 'n': 1 }, { 'n': 2 }];   _.max

_.overArgs

_.overArgs(func, [transforms=[_.identity]]) source npm package Creates a function that invokes func with its arguments transformed. Since 4.0.0 Arguments func (Function): The function to wrap. [transforms=[_.identity]] (...(Function|Function[])): The argument transforms. Returns (Function): Returns the new function. Example function doubled(n) {   return n * 2; }   function square(n) {   return n * n; }   var func = _.overArgs(function(x, y) {   return [x, y]; }, [square, doubled]);  

_.mean

_.mean(array) source npm package Computes the mean of the values in array. Since 4.0.0 Arguments array (Array): The array to iterate over. Returns (number): Returns the mean. Example _.mean([4, 2, 8, 6]); // => 5

_.padStart

_.padStart([string=''], [length=0], [chars=' ']) source npm package Pads string on the left side if it's shorter than length. Padding characters are truncated if they exceed length. Since 4.0.0 Arguments [string=''] (string): The string to pad. [length=0] (number): The padding length. [chars=' '] (string): The string used as padding. Returns (string): Returns the padded string. Example _.padStart('abc', 6); // => '   abc'   _.padStart('abc', 6, '_-'); // => '_-_abc'   _.padStart('a

_.curry

_.curry(func, [arity=func.length]) source npm package Creates a function that accepts arguments of func and either invokes func returning its result, if at least arity number of arguments have been provided, or returns a function that accepts the remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient.The _.curry.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for provided arguments.Note: This method do

_.prototype.commit

_.prototype.commit() source Executes the chain sequence and returns the wrapped result. Since 3.2.0 Returns (Object): Returns the new lodash wrapper instance. Example var array = [1, 2]; var wrapped = _(array).push(3);   console.log(array); // => [1, 2]   wrapped = wrapped.commit(); console.log(array); // => [1, 2, 3]   wrapped.last(); // => 3   console.log(array); // => [1, 2, 3]

_.meanBy

_.meanBy(array, [iteratee=_.identity]) source npm package This method is like _.mean except that it accepts iteratee which is invoked for each element in array to generate the value to be averaged. The iteratee is invoked with one argument: (value). Since 4.7.0 Arguments array (Array): The array to iterate over. [iteratee=_.identity] (Function): The iteratee invoked per element. Returns (number): Returns the mean. Example var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];   _

_.findLast

_.findLast(collection, [predicate=_.identity], [fromIndex=collection.length-1]) source npm package This method is like _.find except that it iterates over elements of collection from right to left. Since 2.0.0 Arguments collection (Array|Object): The collection to inspect. [predicate=_.identity] (Function): The function invoked per iteration. [fromIndex=collection.length-1] (number): The index to search from. Returns (*): Returns the matched element, else undefined. Example _.findLast([1

_.zip

_.zip([arrays]) source npm package Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on. Since 0.1.0 Arguments [arrays] (...Array): The arrays to process. Returns (Array): Returns the new array of grouped elements. Example _.zip(['a', 'b'], [1, 2], [true, false]); // => [['a', 1, true], ['b', 2, false]]