Handy code snippets you can copy and paste.
Get the text a user selects on a webpage as a string.
JavaScript
Easily remove duplicates with the Set constructor in JavaScript.
JavaScript
Limit the contents of a block container to the specified number of lines.
CSS
Replace broken image links with a placeholder with Next.js image.
Next.js
React
Remove unwanted keys and values from a JavaScript object.
JavaScript
Shorten a number like 34,000 to 34K.
JavaScript
Combine CSS classes for easy dynamic styling.
JavaScript
CSS
Convert a date to a readable format.
JavaScript
Check if an object is empty.
JavaScript