bun i -D @archoleat/validate-font-file-name
The font family and font weight must be in Pascal Case and separated by a hyphen.
Extensions that are allowed: otf
, ttf
, woff
, woff2
.
Example:
OpenSans-SemiBold.woff2
.
It's not necessary to specify the regex
parameter.
import { validateFontFileName } from '@archoleat/validate-font-file-name';
await validateFontFileName({
file: 'path/to/file',
regex: /regex/ | new RegExp() | '',
});
Please read CONTRIBUTING to start contributing.
This project is licensed under the MIT license.