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, Type
Checks if the provided value is an object created by the Object constructor.
JavaScript, Type
Checks if the provided string is a valid JSON.
JavaScript, String
When it comes to immutability, many developers have trouble wrapping their head around JavaScript strings. Yet they're not as complicated as you might expect.
JavaScript, Type
Casts the provided value as an array if it's not one.
JavaScript, Type
Clones a regular expression.
JavaScript, Type
Returns the first defined, non-null argument.
JavaScript, Type
Checks if the given argument is a function.
JavaScript, Type
Checks if a value is object-like.
JavaScript, Type
Checks if the passed value is primitive or not.
JavaScript, Type
Checks if the given argument is a string. Only works for string primitives.
JavaScript, Object
Object.is()
and the triple equals operator (===
) can both be used for equality checking in JavaScript, but when should you use each one?
JavaScript, Type
Checks if the given argument is a native boolean element.
JavaScript, Type
Checks if the given argument is a number.
JavaScript, Type
Checks if the given argument is a symbol.
JavaScript, Type
Checks if the specified value is null
or undefined
.