Remove accents from a JavaScript string
Learn how to remove accents from a string in JavaScript, quickly and efficiently.
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.
Learn how to remove accents from a string in JavaScript, quickly and efficiently.
Implement the Levenshtein distance algorithm in JavaScript to calculate the difference between two strings.
Learn how to capitalize the first letter of a string in JavaScript using array destructuring and String.prototype.toUpperCase()
.
Use JavaScript to generate a random alphanumeric string of a specified length.
Check if a string is an anagram of another string, handling case-insensitivity and special characters.
Learn how to convert text into HTML-safe strings and vice versa using JavaScript.
Email address validation can be much trickier than it sounds. Here's why and my advice on how to approach this problem.
Quickly and easily check if a string is a yes/no answer to a boolean question in your CLI programs.
String splitting and truncation, both simple and locale-sensitive are possible in JavaScript. Learn how in this guide.
Get all the partial substrings of a string in JavaScript using generator functions.
Use a regular expression to check if a string contains only alpha or alphanumeric characters in JavaScript.
Get the time part of a Date object in the format HH:MM:SS.
Here's a quick tip on how to compare and sort arrays of strings, ignoring case and accents.
Regular expressions are a very useful tool. Save this cheatsheet for when you need to look up their syntax and speed up your development.
Want to know if a string is an absolute URL? This snippet will help you out.
If you need to replace all occurrences of a string in JavaScript, you have a couple of options.
Having trouble with inconsistent line endings in your strings? Normalize them with this handy JavaScript function!
Encode and decode strings with Base64 in JavaScript easily with these code snippets.
Avoid the naive approach and use a more robust method to edit URL parameters in JavaScript.
A short guide on how to correctly construct a URL in JavaScript.
Use a regular expression to remove HTML/XML tags from a string.
Test if a string's start or end partially matches another string.
Remove non-printable ASCII characters from a string in JavaScript.
Convert a number in bytes to a human-readable string.