MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / isLatexString

Function isLatexString

src/compute-engine/latex-syntax/utils.ts:4–7  ·  view source on GitHub ↗
(s: unknown)

Source from the content-addressed store, hash-verified

2import { DEFINITIONS_INEQUALITIES } from './dictionary/definitions-relational-operators.js';
3
4export function isLatexString(s: unknown): s is string {
5 if (typeof s === 'string') return s.startsWith('$') && s.endsWith('$');
6 return false;
7}
8
9export function asLatexString(s: unknown): string | null {
10 if (typeof s === 'number') return s.toString();

Callers 2

createErrorExpressionFunction · 0.90
dynamicValueFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected