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

Calculates the average of the elements in the given list. If you pass a list of numbers, it calculates the average directly. If you pass a list of objects, provide the key to calculate the average.

f
clone

Clone an object using structuredClone.

f
daysBetween

Calculates the days between two dates.

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.

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.

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
monthsBetween

Calculates the months between two dates.

T
None

Syntactic sugar for null | undefined.

T
NonEmptyList

Represents a non-empty list.

f
now

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

T
OneOrMany

Represents when there can be one or many of someting

f
onlyAlpha

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

f
onlyAlphanumeric

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
onlyNumeric

Removes any non-numeric characters. This includes spaces.

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 nobject type and makes the hover overlay more readable for the developer.

T
Primitive

Represents any primitive ECMAScript value.

f
rand

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
sample

Pick a random item from an array.

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

Sums the elements in the given list. If you pass a list of numbers, it sums them directly. If you pass a list of objects, provide the key to sum.

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
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.

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.