@momsfriendlydevco/fa-icons

1.0.1 • Public • Published

@MomsFriendlyDevCo/Icons

Module which returns the closest FontAwesome class to a file name.

var faIcons = require('@momsfriendlydevco/fa-icons');

faIcons('something.mp4') //= "fas fa-file-video"
faIcons('something.csv') //= "fas fa-file-csv"
faIcons('something.weird') //= "fas fa-file"

API

This module exposes a single function which resolves with the best matching class based on an input file path.

faIcons(path)

Returns the cloest matching icon based on the internal index.

faIcons.index

Collection of rules to use when matching the path against the icon.

Dependents (0)

Package Sidebar

Install

npm i @momsfriendlydevco/fa-icons

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

3.27 kB

Total Files

4

Last publish

Collaborators

  • 1watt
  • eekthecat
  • hash-bang
  • melromero
  • mr-yellow