-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Saran Tanpituckpong edited this page Sep 18, 2016
·
6 revisions
You can get icon character list easily.
const _ = require('lodash');
const faIconChars = require('font-awesome-icon-chars'); // You will get array of icon character.
let faGlass = _.find(faIconChars, ['id', 'glass']); // { id: 'glass', unicode: 'f000' }
console.log(faGlass.id); // glass
console.log(faGlass.unicode); // f000
If you want to parse unicode string code to real unicode character, you can use String.fromCharCode
.
let faGlassChar = String.fromCharCode(parseInt('0x' + faGlass.unicode, 16)); // == '\uf000'