Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc. It provides us with various inbuilt functions and uses a functional programming approach which makes coding in JavaScript easier to understand because instead of writing repetitive functions, tasks can be accomplished with a single line of code.
Lodash Methods |
Description |
---|---|
_.castArray() | It is used to cast value into an array if it is not an array. |
_.clone() | It is used to create a shallow copy of the value. |
_.cloneDeep() | It is used to create a deep copy of the value. |
_.cloneDeepWith() | It is used to clone value in a recursive way. |
_.cloneWith() | It is used to create a shallow copy of the value. |
_.conformsTo() | It is used to check if the given object conforms to the given source. |
_.eq() | It is used to find the two values are equivalent or not by performing the SameValueZero comparison. |
_.gt() | It is used to find the value is greater than other or not. |
_.gte() | It checks whether the specified value is greater than or equal to other or not. |
_.isArguments() | It checks if value is likely an arguments object. |
_.isArray() | It checks if the given value can be classified as an Array Value or not. |
_.isArrayBuffer() | It checks if the given object or value can be classified as an ArrayBuffer Value or not. |
_.isArrayLike() | It checks if the value is Array-like. |
_.isArrayLikeObject() | It checks the given value is an Array-like Object or not. |
_.isBoolean() | It checks if the given value can be classified as Boolean value or not. |
_.isBuffer() | It checks if the given value is Buffer or not. |
_.isDate() | It checks if the given value can be classified as Date Object or not. |
_.isElement() | It checks whether the specified value is a DOM element or not. |
_.isEmpty() | It checks if the value is an empty object, collection, map, or set. |
_.isEqual() | It performs a deep comparison between two values to determine if they are equivalent. |
_.isEqualWith() | It performs a deep comparison between two values to determine if they are equivalent. |
_.isError() | It checks whether the given value is a type of error or not. |
_.isFinite() | It checks whether the given value is a primitive finite number or not. |
_.isFunction() | it checks whether the given value is a function object or not. |
_.isInteger() | It checks whether the given value is an Integer or not. |
_.isLength() | It checks whether the given value is an Array-like length or not. |
_.isMap() | It checks whether the given value is a map object or not. |
_.isMatch() | It compares between object and source to determine if the object contains equivalent property values. |
_.isMatchWith() | It compares between object and source to determine if the object contains equivalent property values. |
_.isNaN() | It checks the given value is NaN or not. |
_.isNative() | It checks whether the specified value is a pristine native function or not. |
_.isNil() | It check if the value is null or undefined. |
_.isNull() | It is used to find whether the value of the object is null. |
_.isNumber() | It is used to find whether the given value parameter is number or not. |
_.isObject() | It is used to find whether the given value is an object or not. |
_.isObjectLike() | It is used to find whether the given value is an object-like or not. |
_.isPlainObject() | It checks if value is a plain object. |
_.isRegExp() | It is used to find whether the given value is a regular expression or not. |
_.isSafeInteger() | It is used to find whether the given value is a safe integer or not. |
_.isSet() | It is used to find whether the given value is classified as a Set object or not. |
_.isString() | It is used to find whether the given value is a string object or not. |
_.isSymbol() | It is used to find whether the given value is a symbol object or not. |
_.isTypedArray() | It is used to find whether the given value is a typed array or not. |
_.isUndefined() | It is used to find whether the given value is undefined or not. |
_.isWeakMap() | It is used to find whether the given value is a weakmap object or not. |
_.isWeakSet() | It is used to find whether the given value is a weakset object or not. |
_.lt() | It checks if value is less than the other value. |
_.lte() | It checks if value is less than or equal to other value or not. |
_.toArray() | It checks if value is less than or equal to other value or not. |
_.toFinite() | It is used to convert the given value to a finite number. |
_.toInteger() | It is used to convert the given value to an integer number. |
_.toLength() | It converts the given value to an integer suitable for use as the length of an array-like object. |
_.toNumber() | It is used to convert the given value to a number. |
_.toPlainObject() | It is used to convert the specified value to a plain object. |
_.toSafeInteger() | It is used to convert the value to a safe integer. |
_.toString() | It is used to convert the given value to a string. |