General node js utils library.
Currently supported utils:
assignWith
- Assigns the object properties from the sourcescamelize
- simple camel casecapitalize
- make first char uppercaseclone
- Shallow clone the objectcloneDeep
- deep clone functionality for objectsdifference
- creates an array of values from the first argument not included in the second argumentfindLastIndex
- Returns the index of the last element in the array that satisfies the provided testing function.flow
- generate a composite function that returns the result of provided functions called by the chain; each previous function result passes as the argument of the next function in the chainfreezeDeep
- deep freezes objectsget
- get the object members by pathgetArrayHasIntersect
- checks if arrays have at least one common valuegetArrayUniq
- gets unique values form arrayinvert
- Inverts the key-value pairs of an objectgroupBy
- groups the elements of an array by a specified key.isEmpty
- checks if value is an empty object, collection, map, or setisEqual
- check if passed two values are equalisFinite
- checks if input is a finite number.isFunction
- checks if input is a Function object.isMatch
- Checks if first argument is a match with lastisNil
- checks whenever value is null or undefinedisNumber
- checks if input is a number.isObject
- checks if the input is not a nullable object instanceisObjectLike
- Checks if passedvalue
is object-like. A value is object-like if it's notnull
isPlainObject
- checks if input is object, not null object and not array objectisString
- checks if input is a stringisUndefined
- checks if an input is undefinedmapKeys
- creates new object with the same values but with keys mapped by the provided functionmapValues
- Maps the values of an object or array using the provided iteratee function or property pathmax
- computes the maximum value of array. If array is empty or falsey, undefined is returnedmean
- Returns the mean of an array of numbersmerge
- deep merge functionality for objectsmin
- computes the minimum value of array. If array is empty or falsey, undefined is returnedomit
- provides new object that omits only specific fields of source objectomitBy
- provides new object that omits only specific fields of source object depending on predicate function filterpick
- provides new object that picks only specific fields of source objectpickBy
- provides new object that picks only specific fields of source object depending on predicate function filterresolvePromiseCb
- helper to add callback support to async functionsshuffle
- performs pseudo random shuffle on clone of the arraysnakeCase
- convert camel case and string/dash separated strings to snake casesum
- calculate sum of array itemssumBy
- calculate sum of array items using iteratee function or string shortcutunion
- Returns the union of the given arraysuniqBy
- get unique values of array by the iteratee function or property pathuniqWith
- Returns a new array with unique values, using a comparator functionupdate
- Update the object with the updater by pathvalidateInput
- validates the input based on the regex format options:NUMBER | EMAIL | PATH | NAME | NAME_WITH_DIGITS | INPUT | ADDRESS | PHONE_CODE | PHONE | IMAGE | FILE | FILENAME | PASSWORD
without
- creates an array of values from the first argument excluding all given arguments