src/index.js
function guessFontStyle(basename) {
  return basename
    .split('-')
    .slice(1)
    .map(item => item.toLowerCase())
    .reduce((prev, item) => {
      if (fontStyleKeywords.indexOf(item) >= 0) {
        return `font-style:${item};`
      }

      return prev
    }, '')
}
function guessFontStyle(basename) {
  return basename
    .split('-')
    .slice(1)
    .map(item => item.toLowerCase())
    .reduce((prev, item) => {
      if (fontStyleKeywords.indexOf(item) >= 0) {
        return `font-style:${item};`
      }

      return prev
    }, '')
}
function guessFontStyle ( basename ) { return basename . split ( '-' ) . slice ( 1 ) . map ( item => item . toLowerCase ( ) ) . reduce ( ( prev , item ) => { if ( fontStyleKeywords . indexOf ( item ) >= 0 ) { return ` ${ item } ` } return prev } , '' ) }
Guess the `font-style` property from the font file name.
@param  {String} basename Font base filename.
@return {String}          `font-style` property and guessed value.
Guess the font - style property from the font file name .