@johnfrancis/lodash v1.0.0
Sample Lodash Functions
Hi! these are 10 random lodash functions written in ES6
1> chunk()
Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements.
useage : chunk(array:[], size?:int default:1) return type []
2> compact()
Creates an array with all falsey values removed.The values false, null, 0, "", undefined, and NaN are falsey.
useage : compact(array:[]) return type []
3> concat()
Creates a new array concatenating array with any additional arrays and/or values.
useage : concat(array:[],array:[] or vals :any) return type []
4> drop()
Creates a slice of array with n elements dropped from the beginning.
useage : drop(array:[], size?:int default:1) return type []
5> fill()
Fills elements of array with value from start up to, but not including, end.
useage : drop(array:[],replacement:any, start?:int default:0, end :int) return type []
6> head()
Gets the first element of array.
useage : head(array:[]) return type any
7> join()
Converts all elements in array into a string separated by separator.
useage : join(array:[],seperator:str) return type string
8> pull()
Returs array without given values from pull_array
useage : pull(array:[],pullArray:[]) return type []
9> reverse()
Returs reversed array
useage : reverse(array:[]) return type []
10> union()
Returns union of two arrays without duplicates
useage : reverse(array1:[],array2:[]) return type []
creator: John Francis
4 years ago