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.
Replaces all but the last num
of characters with the specified mask character.
JavaScript, String · Oct 21, 2020
Serializes a cookie name-value pair into a Set-Cookie header string.
JavaScript, Browser · Oct 22, 2020
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, String · Oct 10, 2021
Decodes a string of data which has been encoded using base-64 encoding.
JavaScript, Node · Sep 15, 2020
Checks if the given string contains any whitespace characters.
JavaScript, String · Oct 18, 2020
Pads a string on both sides with the specified character, if it's shorter than the specified length
.
JavaScript, String · Oct 22, 2020
Truncates a string up to specified length, respecting whitespace when possible.
JavaScript, String · Oct 21, 2020
Takes a number and returns it in the specified currency formatting.
JavaScript, Math · Oct 22, 2020
Checks if the given argument is a string. Only works for string primitives.
JavaScript, Type · Oct 20, 2020