Helpers
Transformers
setToArray
: Converts aSet
to anarray
.arrayToSet
: Converts anarray
to aSet
.parseNumber
: Parses the given value into a number.parseBoolean
: Parses the given value and returns a boolean representation.objectKeys
: Returns an array of keys from the given object.objectValues
: Returns an array of values from the given object.objectEntries
: Returns an array of entries from the given object.objectToMap
: Converts an object to a Map.sortObjectsAlphabetically
: Sorts an array of objects alphabetically based on a specified key.sortObjectsNumerically
: Sorts an array of objects numerically based on a specified key.sortAlphabetically
: Sorts an array ofstrings
alphabetically, in ascending or descending order.sortNumerically
: Sorts an array ofnumbers
in ascending or descending order.mapValue
: Maps the values of a specific key from an array of objects.scrutinize
: Filters an array based on a given predicate function.doubleLoop
: Executes a callback function for each item in an array of objects, where each object has an array property.tripleLoop
: Executes a triple loop over an array of objects and invokes a callback function for each iteration.chunkMultiline
: Splits a multilinestring
into an array of strings, where eachstring
has a maximum length ofmaxLength
.
For Maps
mapValuesToArray
: Converts the values of aMap
to an array.mapKeysToArray
: Returns an array containing all the keys from a givenMap
.mapEntriesToArray
: Converts aMap
object to an array of key-value pairs.mapToObject
: Converts aMap
to an object.setInMapIfNotExists
: Sets a key-value pair in aMap
if the key does not already exist.returnAMergeWith
: Merges two maps and returns a new map.putArrayItemsInMap
: Puts array items in a Map.mergeMaps
: Merges two maps into a newMap
.fromMapOfSetsToMapsOfArrays
: Converts aMap
ofSets
to aMap
ofArrays
.mapFromArray
: Creates aMap
from an array of items, using a key handler function to determine the keys.mapFromArrayWithValues
: Creates a newMap
object from an array by applying a transformation function to each item.mapOfArraysFromArray
: Creates aMap
of arrays from an input array, using a key handler function.mergeMapsOfArrays
: Merges two maps of arrays into a single map of arrays. The resulting map contains unique values from both input maps.
String processors
capitalize
: Converts first character ofstring
literal type to uppercase.uncapitalize
: Converts first character ofstring
literal type to lowercase.kebabCase
: Converts astring
to kebab case.pascalCase
: Converts astring
to pascal case.snakeCase
: Converts astring
to snake case.camelCase
: Converts astring
to camel case.upper
: Converts astring
to uppercase.lower
: Converts astring
to lowercase.removeAll
: Removes all occurrences of a targetstring
from the inputstring
.replaceAll
: Replaces all occurrences of a targetstring
with a replacementstring
in a givenstring
.first
: Returns the first element of astring
after splitting it by a separator.last
: Returns the last part of astring
after a specified separator.removeExtension
: Removes the file extension from a givenstring
.reverse
: Reverses astring
.underscorePerSpace
: Replaces all underscores (_
) in the given text with spaces.spacePerUnderScore
: Replaces all spaces in the given text with underscores (_
).hyphenPerSpace
: Replaces all hyphens (-
) in the given text with spaces.spacePerHyphen
: Replaces all spaces in the given text with hyphens (-
).
Casters
isBoolean
: Checks if a value is a boolean.isString
: Checks if the provided value is astring
.isChar
: Checks if the provided value is a single characterstring
.isHTTP_URL
: Checks if a givenstring
is a valid HTTP URL.isNotEmptyString
: Checks if astring
is not empty.isNumber
: Checks if the provided value is a number.isObject
: Checks if the given value is an object.isEmptyObject
: Checks if the given object is an empty object.isDictOfStrings
: Checks if the given object is a dictionary (object
) where all values of typestring
.isDictOfNumbers
: Checks if the given object is a dictionary (object
) with values of typenumber
.isDictOfBooleans
: Checks if the given object is a dictionary (object
) with values of typeboolean
.isDictOfObjects
: Checks if the given object is a dictionary (object
) with values of typeobject
.isDictOfArrays
: Checks if the given object is a dictionary (object
) with values of typearray
.isPrimitive
: Checks if a value is a primitive type (string
,number
,boolean
, ornull
).isNonNullablePrimitive
: Checks if a value is a primitive type (string
,number
, orboolean
).isMap
: Checks if the provided value is an instance ofMap
.isObjectKeyMap
: Checks if the given map is aMap
where the keys are objects.isStringKeyMap
: Checks if the provided value is aMap
withstring
keys.isNumberKeyMap
: Checks if the provided value is aMap
withnumber
keys.isStringOrNumberKeyMap
: Checks if the provided value is aMap
withstring
ornumber
keys.isArray
: Checks if the provided value is an array.isArrayOfNumbers
: Checks if the given array is an array of numbers.isArrayOfStrings
: Checks if the given value is an array of strings.isArrayOfObjects
: Checks if the given array is an array of objects.isArrayOfBooleans
: Checks if the given array is an array of booleans.isMatrix
: Checks if the given array is a matrix. A matrix is defined as a two-dimensional array where each element is an array.
Promises
reducePromisedItems
: This function reduces promised items.mergePromises
: Merges an array of promises into a single promise that resolves to an array of values.countPromises
: Counts the resolved values of an array of promises and returns the sum.awaitResolved
: Waits for multiple promises to resolve and returns an array of resolved values.awaitRejected
: Returns an array of rejected reasons from an array of promises.awaitClassified
: Waits for multiple promises to settle and classifies the results intoresolved
andrejected
arrays.
Other
inferTypeOfArray
: Infers the types of elements in an array, returning a list with the types.sleep
: Asynchronously pauses the execution for the specified amount of time.