MCPcopy Index your code
hub / github.com/markdoc/markdoc / isIdentifier

Function isIdentifier

src/utils.ts:18–20  ·  view source on GitHub ↗
(s: any)

Source from the content-addressed store, hash-verified

16export const IDENTIFIER_REGEX = /^[a-zA-Z0-9_-]+$/;
17
18export function isIdentifier(s: any): s is string {
19 return typeof s === 'string' && IDENTIFIER_REGEX.test(s);
20}
21
22export function isPromise(a: any): a is Promise<any> {
23 return a && typeof a === 'object' && typeof a.then === 'function';

Callers 3

formatScalarFunction · 0.90
formatAnnotationValueFunction · 0.90
formatVariableFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…