Favorite JavaScript utilities in single line of code! No more!
Star me on GitHub ● 6521★
Array
Convert an array of objects to a single object
Compare two arrays regardless of order
Count the occurrences of a value in an array
Count the occurrences of array elements
Compare two arrays
Create an array of numbers in the given range
Empty an array
Create an array of cumulative sum
See all 50 helpers
DOM
Check if an element is a descendant of another
Check if the touch events are supported
Check if an element is focused
Detect Internet Explorer browser
Check if user scrolls to the bottom of the page
Detect macOS browser
Get all siblings of an element
Get the position of an element relative to the document
See all 23 helpers
Date Time
Add AM PM suffix to an hour
Calculate the number of months between two dates
Compare two dates
Convert a date to YYYY-MM-DD format
Calculate the number of difference days between two dates
Determine one year from now
Extract year, month, day, hour, minute, second and millisecond from a date
Convert seconds to hh:mm:ss format
See all 24 helpers
Function
Check if a value is a function
Box handler
Check if a value is an async function
Check if a value is a generator function
Compose functions from left to right
Create a function that accepts a single argument
Compose functions
Create an empty function
See all 17 helpers
Math
Calculate the angle of a line defined by two points
Calculate the linear interpolation between two numbers
Calculate the midpoint between two points
Check if a point is inside a rectangle
Check if a rectangle contains other one
Convert degrees to radians
Normalize the ratio of a number in a range
Round a number to the nearest multiple of a given value
See all 11 helpers
Misc
Check if the code is running in the browser
Convert Celsius to Fahrenheit
Clear all cookies
Convert 3 digits color to 6 digits color
Check if the code is running in NodeJS
Convert Fahrenheit to Celsius
Convert cookie to object
Convert hex to rgb
See all 25 helpers
Number
Add an ordinal suffix to a number
Calculate the average of arguments
Calculate Fibonacci numbers
Calculate the remainder of division of arguments
Calculate the division of arguments
Calculate the factorial of a number
Compute the greatest common divisor between two numbers
Calculate the mod of collection index
See all 21 helpers
Object
Check if multiple objects are equal
Create an empty map that does not have properties
Returns an object with unique values by key
Extract values of a property from an array of objects
Get the value at given path of an object
Create an object from the pairs of key and value
Immutably rename object keys
Omit a subset of properties from an object
See all 13 helpers
Random
Generate a random boolean
Generate a random integer in given range
Generate a random floating point number in given range
Generate a random hex color
Generate a random IP address
Generate a random string from given characters
Generate a random string using Node crypto module
Generate a random UUID
See all 16 helpers
String
Capitalize a string
Check if a path is relative
Check if a string consists of a repeated character sequence
Check if a URL is absolute
Check if a string is a palindrome
Check if two strings are anagram
Convert a base64 encoded string to an uint8 array
Convert a string to camelCase
See all 51 helpers
Validator
Check if a date is a weekday
Check if a character is a digit
Check if a date is between two dates
Check if a date is today
Check if a date is a weekend
Check if a date occurs in the current year
Check if a given integer is a prime number
Check if a number is a power of 2
See all 47 helpers
Follow me on
Twitter
and
GitHub
to get more useful contents.