_.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]

_.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

_.runInContext

_.runInContext([context=root]) source npm package Create a new pristine lodash function using the context object. Since 1.1.0 Arguments [context=root] (Object): The context object. Returns (Function): Returns a new lodash function. Example _.mixin({ 'foo': _.constant('foo') });   var lodash = _.runInContext(); lodash.mixin({ 'bar': lodash.constant('bar') });   _.isFunction(_.foo); // => true _.isFunction(_.bar); // => false   lodash.isFunction(lodash.foo); // => false lodash.isFun

_.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

_.reverse

_.reverse(array) source npm package Reverses array so that the first element becomes the last, the second element becomes the second to last, and so on.Note: This method mutates array and is based on Array#reverse. Since 4.0.0 Arguments array (Array): The array to modify. Returns (Array): Returns array. Example var array = [1, 2, 3];   _.reverse(array); // => [3, 2, 1]   console.log(array); // => [3, 2, 1]

_.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, 

_.rest

_.rest(func, [start=func.length-1]) source npm package Creates a function that invokes func with the this binding of the created function and arguments from start and beyond provided as an array.Note: This method is based on the rest parameter. Since 4.0.0 Arguments func (Function): The function to apply a rest parameter to. [start=func.length-1] (number): The start position of the rest parameter. Returns (Function): Returns the new function. Example var say = _.rest(function(what, names)

_.replace

_.replace([string=''], pattern, replacement) source npm package Replaces matches for pattern in string with replacement.Note: This method is based on String#replace. Since 4.0.0 Arguments [string=''] (string): The string to modify. pattern (RegExp|string): The pattern to replace. replacement (Function|string): The match replacement. Returns (string): Returns the modified string. Example _.replace('Hi Fred', 'Fred', 'Barney'); // => 'Hi Barney'

_.repeat

_.repeat([string=''], [n=1]) source npm package Repeats the given string n times. Since 3.0.0 Arguments [string=''] (string): The string to repeat. [n=1] (number): The number of times to repeat the string. Returns (string): Returns the repeated string. Example _.repeat('*', 3); // => '***'   _.repeat('abc', 2); // => 'abcabc'   _.repeat('abc', 0); // => ''

_.remove

_.remove(array, [predicate=_.identity]) source npm package Removes all elements from array that predicate returns truthy for and returns an array of the removed elements. The predicate is invoked with three arguments: (value, index, array).Note: Unlike _.filter, this method mutates array. Use _.pull to pull elements from an array by value. Since 2.0.0 Arguments array (Array): The array to modify. [predicate=_.identity] (Function): The function invoked per iteration. Returns (Array): Retur