@archoleat/validate-font-file-name
v1.2.4
Published
Validate font file names
Downloads
29
Maintainers
Readme
Validate Font File Name
Table of Contents
Validate font file names.
Installation
bun i -D @archoleat/validate-font-file-nameUsage
import { validateFontFileName } from '@archoleat/validate-font-file-name';
await validateFontFileName({
file: string,
regex?: string | RegExp,
});Naming Convention
The font family and font weight must be in Pascal Case and separated by a hyphen.
Postfixes that are allowed: Italic, Variable.
Extensions that are allowed: woff2, woff, otf, ttf.
Examples:
FontFamily-Bold.woff2,FontFamily-SemiBoldItalic.woff,FontFamily-MediumVariable.otf,FontFamily-RegularItalicVariable.ttf.
Contributing
Please read CONTRIBUTING to start contributing.
License
This project is licensed under the MIT license.
