@kernel-js/support
Last updated
Was this helpful?
Last updated
Was this helpful?
Util functions and classes
Expose some functions
Exports additional helpers
npm install @kernel-js/support
camelCase
capitalize
find
floor
get
has
hasIn
head
keysIn
last
set
snakeCase
startCase
map
mapValues
omitBy
unset
env
isArray
isObject
isEmpty
isNotEmpty
toBoolean
removeEmpty
mapEmptyToNull
Gets the value of an environment variable.
key
- the path to the property you want. You can use dot notation on nested objects
defaultValue
- the optional default value when the key was not found
Return a boolean if the informed value is of Array type.
value
- any value
Return a boolean if the informed value is of Object type.
value
- any value
Check if the informed value is empty. This is a little different of lodash behaviour, booleans are not considered empty and ' ' for example is considered empty.
value
- any value
Just the oposite of isEmpty.
value
- any value
Converts a give string or number into boolean or return null when cannot convert it.
Arguments
value
- any value
Removes any empty property from object using isEmpty helper.
Arguments
value
- any object
Converts any empty property of object to null using isEmpty helper.
Arguments
value
- any object