Easily use Nerd Font icons in JavaScript!
npm install nf-icons
yarn add nf-icons
First, make sure you are using one of the Nerd Fonts.
Then:
const icons = require('nf-icons');
console.log(icons.utf16(icons.names.MDI_EMOTICON_COOL)); // B)
See doc strings in index.ts