Truncates a string and adds an ellipsis onto the end
Returns num
as-is, unless num
is Infinity, -Infinity, or NaN,
in which case it returns null
Returns a promise along with the resolve
and reject
methods that
control it.
Type-garded Object.hasOwnProperty
the object
the property to check
Type-garded property check
the object
the property to check
Boolean type guard
Function type guard
Type-garded Array.includes
the item to search for
the array to search
Map type guard
null type guard
nullish (null
or undefined
) type-guard
Number type guard
object type guard
Primitive type guard
JS Primitives are: string | number | bigint | boolean | undefined | symbol | null
Promise type guard
Set type guard
String type guard
Returns the last item of an array
Creates a function that invokes fn
with the args
prepended to the
arguments that it recieves.
the original function
Creates a function that returns the result of invoking the given functions, (left-to-right), where each successive invocation is supplied the return value of the previous.
Similar to Array.pop, but returns an array along with the "popped" item instead of modifying the original array.
Takes in a callback-based function and returns a promise-based function
The callback must be a node-style callback whose first argument is an error when the function fails, or null when it succeeds. The second argument is the result.
the callback-based function to promisify
a promise-based function
Takes in a callback-based function and returns a promise-based function
The callback must be a node-style callback whose first argument is an error when the function fails, or null when it succeeds. The second argument is the result.
a promise-based function
Similar to Array.push, but returns a new array instead of modifying the original array.
Wraps a string in quotes
the string to wrap
the quoted string
Alias of String.replace
Alias of String.replace
Iterates over searchReplaceMap
, calling source.replace(key, value) for each entry
in the object
A combined interface for setTimeout, requestIdleCallback, and requestAnimationFrame
callback function
returns a promise-like function that, when called, will cancel the
timeout. When await
-ed, it will resolve with the return value of
the callback once it is called, or will reject
A helper for handling awkward try/catch blocks
a function that has no arguments
the return value of fn
, or undefined
if fn
throws an error
Simple tagged template literal that returns a string render function
A helper for handling awkward try/catch blocks
a function that has no arguments and returns a promise
a promise that resolves to [undefined, error] if the promise rejects, and [value, undefined] if the promise resolves
A helper for handling awkward try/catch blocks
a function that has no arguments
if function throws an error, and [value, undefined] if it succeeds
A helper for handling awkward try/catch blocks
a promise
if the promise rejects, and [value, undefined] if it resolves
Truncates a string
Similar to Array.pop, but returns an array along with the "popped" item instead of modifying the original array.
Generated using TypeDoc
Creates a function that returns the result of invoking the given functions, (right-to-left), where each successive invocation is supplied the return value of the previous.