@archoleat/validate-font-file-name
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Validate Font File Name

NPM Version NPM Downloads ESM Provenance CodeQL Specs Commitlint Editorconfig Prettier ESLint Remark

Table of Contents

Installation

bun i -D @archoleat/validate-font-file-name

Usage

Naming Convention

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() | '',
});

Contributing

Please read CONTRIBUTING to start contributing.

License

This project is licensed under the MIT license.

Dependencies (2)

Dev Dependencies (41)

Package Sidebar

Install

npm i @archoleat/validate-font-file-name

Weekly Downloads

54

Version

1.2.0

License

MIT

Unpacked Size

7 kB

Total Files

5

Last publish

Collaborators

  • nikkeyl