The JavaScript snippet collection contains a wide variety of ES6 helper functions. It includes helpers for dealing with primitives, arrays and objects, as well as algorithms, DOM manipulation functions and Node.js utilities.
JavaScript, Math
Checks if a number has any decimals digits
JavaScript, Array
Returns the head of an array.
JavaScript, Type
Checks if the passed value is an object or not.
JavaScript, Type
Checks if a value is object-like.
JavaScript, Type
Checks if the provided value is an object created by the Object constructor.
JavaScript, Type
Checks if the passed value is primitive or not.
JavaScript, Object
Checks if two URLs are on the same origin.
JavaScript, Type
Checks if the given argument is a string. Only works for string primitives.
JavaScript, String
Pads a given number to the specified length.
JavaScript, Math
Rounds a number to a specified amount of digits.
JavaScript, Array
Returns every element that exists in any of the two arrays at least once.
JavaScript, Math
Checks if the given value is a number.
JavaScript, Function
Creates a function that accepts up to two arguments, ignoring any additional arguments.
JavaScript, Math
Clamps num
within the inclusive range specified by the boundary values a
and b
.
JavaScript, Type
Clones a regular expression.