_.fill

_.fill(array, value, [start=0], [end=array.length]) source npm package Fills elements of array with value from start up to, but not including, end.Note: This method mutates array. Since 3.2.0 Arguments array (Array): The array to fill. value (*): The value to fill array with. [start=0] (number): The start position. [end=array.length] (number): The end position. Returns (Array): Returns array. Example var array = [1, 2, 3];   _.fill(array, 'a'); console.log(array); // => ['a', 'a', '

_.flatten

_.flatten(array) source npm package Flattens array a single level deep. Since 0.1.0 Arguments array (Array): The array to flatten. Returns (Array): Returns the new flattened array. Example _.flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]

_.countBy

_.countBy(collection, [iteratee=_.identity]) source npm package Creates an object composed of keys generated from the results of running each element of collection thru iteratee. The corresponding value of each key is the number of times the key was returned by iteratee. The iteratee is invoked with one argument: (value). Since 0.5.0 Arguments collection (Array|Object): The collection to iterate over. [iteratee=_.identity] (Function): The iteratee to transform keys. Returns (Object): Retu

_.isObjectLike

_.isObjectLike(value) source npm package Checks if value is object-like. A value is object-like if it's not null and has a typeof result of "object". Since 4.0.0 Arguments value (*): The value to check. Returns (boolean): Returns true if value is object-like, else false. Example _.isObjectLike({}); // => true   _.isObjectLike([1, 2, 3]); // => true   _.isObjectLike(_.noop); // => false   _.isObjectLike(null); // => false

_.castArray

_.castArray(value) source npm package Casts value as an array if it's not one. Since 4.4.0 Arguments value (*): The value to inspect. Returns (Array): Returns the cast array. Example _.castArray(1); // => [1]   _.castArray({ 'a': 1 }); // => [{ 'a': 1 }]   _.castArray('abc'); // => ['abc']   _.castArray(null); // => [null]   _.castArray(undefined); // => [undefined]   _.castArray(); // => []   var array = [1, 2, 3]; console.log(_.castArray(array) === array); // => tru

_.create

_.create(prototype, [properties]) source npm package Creates an object that inherits from the prototype object. If a properties object is given, its own enumerable string keyed properties are assigned to the created object. Since 2.3.0 Arguments prototype (Object): The object to inherit from. [properties] (Object): The properties to assign to the object. Returns (Object): Returns the new object. Example function Shape() {   this.x = 0;   this.y = 0; }   function Circle() {   Shape.call(t

_.invertBy

_.invertBy(object, [iteratee=_.identity]) source npm package This method is like _.invert except that the inverted object is generated from the results of running each element of object thru iteratee. The corresponding inverted value of each inverted key is an array of keys responsible for generating the inverted value. The iteratee is invoked with one argument: (value). Since 4.1.0 Arguments object (Object): The object to invert. [iteratee=_.identity] (Function): The iteratee invoked per e

_.mixin

_.mixin([object=lodash], source, [options={}]) source npm package Adds all own enumerable string keyed function properties of a source object to the destination object. If object is a function, then methods are added to its prototype as well.Note: Use _.runInContext to create a pristine lodash function to avoid conflicts caused by modifying the original. Since 0.1.0 Arguments [object=lodash] (Function|Object): The destination object. source (Object): The object of functions to add. [option

_.toLength

_.toLength(value) source npm package Converts value to an integer suitable for use as the length of an array-like object.Note: This method is based on ToLength. Since 4.0.0 Arguments value (*): The value to convert. Returns (number): Returns the converted integer. Example _.toLength(3.2); // => 3   _.toLength(Number.MIN_VALUE); // => 0   _.toLength(Infinity); // => 4294967295   _.toLength('3.2'); // => 3

_.invoke

_.invoke(object, path, [args]) source npm package Invokes the method at path of object. Since 4.0.0 Arguments object (Object): The object to query. path (Array|string): The path of the method to invoke. [args] (...*): The arguments to invoke the method with. Returns (*): Returns the result of the invoked method. Example var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };   _.invoke(object, 'a[0].b.c.slice', 1, 3); // => [2, 3]