You should be using SVG favicons. They’re supported in all modern browsers right now.
Also, you probably don’t need all these icon links and sizes you’re copying from projects to projects. Let’s find out what’s the absolute minimum required, word by word.
There are countless ways to iterate through JS objects and arrays. Here’s how to do it in the simplest way, with ES6 and beyond, for each purpose.
Loop through keys and values of an object.
Loop through keys of an object.
Loop through values of an object.
Loop through an array.
If you want to
return the items or the whole loop, you have to swap the
forEach for a
map. You can change it in any of the examples above, it will work as expected, and the result will be returned. A
forEach will always return
Build a simple Node.js CLI tool without any dependencies. A single command to
install a repository.
Npm has a great command called
init. Running the command
npm init <something> temporarily installs a package you named
create-<something> to run its
main entry. It uses
npx under the hood, but with a more familiar command.
One significant advantage of
init is that it always uses the latest version of your package; you don’t have to update it manually as you would have to globally. But it still works, you can install the package globally if you prefer.
To get started, you need a
package.json file. By default, it uses the
name field to run the
main file in the terminal. To use a different name than the package name, set it in the
bin field. …