shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
commonFontFileExtensions
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.extension
This function allows you to get an array of common text file extensions with or without the dot Common formats includes: ttf, otf, woff, woff2, eot Extended formats includes: fnt, fon, pfb, pfm, afm, bdf, pcf, snf, pfa, gsf, cff, otc, ttc, dfont, suit, lwfn, ffil, pdb, etx, gdr, cha, chr, bmap, fdb, fd, pk, gf, mf, vf, tfm, ofm, ufm, wfn, fft, sfd, ufo, glif.
Params
- settings{}TCommonFileExtensionsSettings
Settings to customize the function behavior
Return
- -Array<String>
The array of extensions
Example
import { commonFontFileExtensions } from '@blackbyte/sugar/extension';
const extensions = commonFontFileExtensions();Settings
- dotfalseboolean
If true, the dot will be added to the extension
- exclude{(‘esm’|‘cjs’)[]}Array<String>
An array of extensions to exclude
- extendedfalseboolean
If true, the extended formats will be included
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space