UNPKG

postcss-foft-classes

Version:

A postcss plugin to automatically add classes for the FOFT font loading strategy.

17 lines (13 loc) 432 B
var cleanup = require( "./fontFamilyCleanup" ); function removeFontFamily( existingProp, searchFor ) { return cleanup( existingProp ).filter(function( family ) { family = family.toLowerCase(); if( typeof searchFor === 'string' ) { searchFor = [ searchFor ]; } return searchFor.filter(function( fam ) { return family === fam.toLowerCase(); }).length === 0; }).join( ", " ); }; module.exports = removeFontFamily;