js-fns
Small functions I use mostly in my projects, for my learning
List of functions
toString(<string|array>, <if array then joiner>)
This converts the string / array provided to string, if array is provided then array.join()
is used internally to convert the array as string.
optional| joiner
- if you pass the joiner key, it will join the array with the provided key.
toUpper(<string>)
This convert the provided value to string first and make it uppercase.
toLower(<string>)
This convert the provided value to string first and make it lowercase.
isUniqueArray(<array>, <isCaseInSensitive>)
This checks whether the provided array is unique or not.
optional| isCaseInSensitive
, this will make the values in array to lowercase and checks for the unique (internally it calls the cleanPureArray)
uniqueArray(<array>, <isCaseInSensitive>)
This returns a unique array based on the provided array.
optional| isCaseInSensitive
, this will make the values in array to lowercase and start the unique process (internally it calls the cleanPureArray)
isObjectArray(<object_array>)
This will return whether the provided array is object array or not.
parseBoolean(<string>)
This will parse the provided string will return true || false, or return the provided value itself