Socket
Book a DemoInstallSign in
Socket

font-awesome-icons

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-awesome-icons

Returns actual list of Font Awesome icons

1.6.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

font-awesome-icons Build Status

Returns actual list of Font Awesome icons (plain JS array)

Install

$ npm install --save font-awesome-icons

Usage

const faIcons = require('font-awesome-icons');

faIcons.getList().then(icons => console.log(icons.length));
//=> 675

faIcons.getList().then(icons => console.log(icons[0]));
/*=>
{ name: 'Glass',
  id: 'glass',
  unicode: 'f000',
  created: 1,
  filter: [ 'martini', 'drink', 'bar', 'alcohol', 'liquor' ],
  categories: [ 'Web Application Icons' ]
}
*/

API

.getList()

Type: function

Returns a promise with a full list of actual Font Awesome icons.

.version()

Type: function

Returns a promise with an actual version of Font Awesome.

.getCategories(arrayOfNeededKeys)

Type: function

arrayOfNeededKeys - optional parameter with array of needed keys for icons (eg: ['name', 'unicode'])

Returns a promise with a categories array.

[
    {
        name: 'Web Application Icons',
        icons: [
            {
                name: 'Glass',
                id: 'glass',
                unicode: 'f000',
                created: 1,
                filter: [ 'martini', 'drink', 'bar', 'alcohol', 'liquor' ],
                categories: [ 'Web Application Icons' ]
            },
            ...
        ]
    },
    ...
]

.getIconsByCategory(categoryName)

Type: function

Returns a promise with array of icons in needed category.

.getListByKeys(arrayOfNeededKeys)

Type: function

Returns a promise with a full list of Font Awesome icons with needed keys only.

const faIcons = require('font-awesome-icons');

faIcons.getListByKeys(['name', 'unicode']).then(icons => console.log(icons[0]));
//=> { name: 'Glass', unicode: 'f000' }

font-awesome-v5-icons – separate package for Font Awesome v5

License

MIT © Sergey Lysenko

Keywords

json

FAQs

Package last updated on 06 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.