f
addDays

Adds the given amount of days to the specified date.

f
addMonths

Adds the given amount of months to the specified date.

f
addYears

Adds the given amount of years to the specified date.

T
AutoComplete

This is a utility type that allows you to Autocomplete a string.

f
average

Returns the average number from a list of numbers.

T
Brand

Represents a type that is branded with a unique symbol.

f
chunk

Splits an array into chunks of a fixed size.

f
clone

Clone an object using structuredClone.

T
Days

Represents a duration of time in days.

f
daysBetween

Calculates the days between two dates.

f
difference

Returns the difference of multiple arrays.

f
distinct

Returns the distinct values from a list.

c
Duration

A representation of a duration of time within a codebase. This class provides a way to work with durations of time in a type-safe manner.

f
falsy

Determines if the given value is falsy.

f
first

Returns the first thing in a list. If the value is a string, then it will return the first character.

T
Hours

Represents a duration of time in hours.

f
inRange

Returns true if the given value is within the given range.

f
intersection

Returns the intersection of multiple arrays.

f
isEmpty

Determines if the given thing is empty.

f
isEqual

Compares two things by turning them into strings, and comparing them by their string value.

f
isEqualIgnoreCase

Compares two things by turning them into strings and lowercasing them, and comparing the string values. Works exactly like isEqual except will lowercase both things before comparing.

f
isEven

Determines if a number is even.

f
isFriday

Checks if a date is a Friday.

f
isInFuture

Determines if the date is in the future.

f
isInPast

Determines if the date is in the past.

f
isMonday

Checks if a date is a Monday.

f
isNone

Returns true if the given value is null or undefined.

f
isNotEmpty

Determines if the given thing is not empty.

f
isNotEqual

Compares two things by turning them into strings, and comparing them by their string value.

f
isNotEqualIgnoreCase

Compares two things by turning them into strings, trimming and lowercasing them, and comparing the string values. Works exactly like isEqual except will lowercase both things before comparing.

f
isNotWhitespace

Determines if the given text contains any non-whitespace characters.

f
isOdd

Determines if a number is odd.

f
isSaturday

Checks if a date is a Saturday.

f
isSome

Returns true if the given value is not null or undefined.

f
isSunday

Checks if a date is a Sunday.

f
isThursday

Checks if a date is a Thursday.

f
isToday

Determines if the date is today.

f
isTuesday

Checks if a date is a Tuesday.

f
isWednesday

Checks if a date is a Wednesday.

f
isWeekday

Checks if a date is a weekday.

f
isWeekend

Checks if a date is a weekend.

f
isWhitespace

Determines if the given text is only comprised of whitespace.

f
kebab

Converts the string to kebab-case by removing punctuation, trimming extra spaces, converting to lowercase, and joining words with hyphens.

f
keepAlphabetical

Returns a copy of the given string with all non-alpha characters removed, except for spaces. Letters are preserved regardless of case.

f
keepAlphanumeric

Returns a copy of the given string with all non-alphanumeric characters removed, except for spaces. Letters and digits are preserved regardless of case.

f
keepNumeric

Removes any non-numeric characters. This includes spaces.

T
KeyOf

This is a utility type that allows you to get the keys from an object or list.

f
last

Returns the last thing in a list. If the value is a string, then it will return the last character.

f
lower

Converts the string to lowercase. An alias for toLowerCase().

f
max

Returns the maximum number from a list of numbers.

T
Milliseconds

Represents a duration of time in milliseconds. You should always use this type when working with durations of time in milliseconds. It helps ensure that you're working with durations of time in milliseconds, and not accidentally using a different unit of time.

f
min

Returns the minimum number from a list of numbers.

T
Minutes

Represents a duration of time in minutes.

f
monthsBetween

Calculates the months between two dates.

T
None

Syntactic sugar for null | undefined.

T
NonEmptyList

Represents a non-empty list.

f
noop

Returns a function that does nothing.

f
now

Right now. This is an alias for new Date().

T
OneOf

This is a utility type that allows you to get the keys from a list.

T
OneOrMany

Represents when there can be one or many of someting

T
Option

Represents a thing that might be None (null or undefined).

f
ordinalize

Converts a number to "1st", "2nd", "3rd", etc.

T
Prettify

A utility type that takes an object type and makes the hover overlay more readable for the developer.

T
Primitive

Represents any primitive ECMAScript value.

f
random

Gives a random number in the given range. The first parameter is inclusive and the second one is exclusive. Therefore, it will work with lists out of the box.

f
reverse

Reverses the given string or list.

f
round

Rounds a number to the nearest integer.

f
sample

Pick a random item from an array.

T
Seconds

Represents a duration of time in seconds.

f
sleep

Sleeps for the given duration of milliseconds.

f
snake

Converts a string to snake_case by replacing spaces and punctuation with underscores. Uses kebab() internally, replacing hyphens with underscores.

f
stringify

Converts the given parameter into the string equivalent.

f
subtractDays

Subtracts the given amount of days from the specified date.

f
subtractMonths

Subtracts the given amount of months from the specified date.

f
subtractYears

Subtracts the given amount of yers from the specified date.

f
sum

Returns the sum of a list of numbers.

f
title

Converts the string to Title Case. This will capitalize the letter of each word that is separated by a space. Underscores are considered spaces. Hyphens are respected.

f
today

Today's date at midnight.

f
tomorrow

Tomorrow's date at midnight.

f
trim

Trims the whitespace from the beginning and the end. This is an alias for .trim(). Useful for when you're mapping over lists.

f
truthy

Determines if the given value is truthy.

f
union

Returns the union of multiple arrays.

f
unique

Returns the distinct values from a list.

f
upper

Converts the string to uppercase. An alias for toUpperCase().

T
ValueOf

This is a utility type that allows you to get the values from an object or a list.

T
Weeks

Represents a duration of time in weeks.

T
Years

Represents a duration of time in years.

f
yearsBetween

Calculates the years between two dates. The date must be equal or past for it to count as a full year.

f
yesterday

Yesterday's date at midnight.