1.2.2 • Published 9 months ago
@archoleat/validate-font-file-name v1.2.2
Validate Font File Name
Table of Contents
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.