MCPcopy Index your code
hub / github.com/fontsource/fontsource / isNumeric

Function isNumeric

api/cdn/src/validate.ts:6–8  ·  view source on GitHub ↗
(num: T)

Source from the content-addressed store, hash-verified

4import { isAcceptedExtension } from './util';
5
6const isNumeric = <T>(num: T): boolean =>
7 (typeof num === 'number' || (typeof num === 'string' && num.trim() !== '')) &&
8 !Number.isNaN(Number(num));
9
10export const validateFontFilename = (file: string, metadata: IDResponse) => {
11 const [filename, extension] = file.split('.');

Callers 2

validateFontFilenameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected