UNPKG

@hashbrownai/core

Version:

Runtime helpers for Hashbrown AI

19 lines 761 B
import { HashbrownType } from './base'; /** * Convert an arbitrary description into a camelCase identifier. * * - Strips out any non-alphanumeric characters * - Splits on whitespace * - Lowercases all words, then uppercases the first letter of each subsequent word * - Prefixes with `_` if the result would start with a digit */ export declare function descriptionToCamelCase(description: string): string; /** * Walks the HashbrownType graph, finds any sub-schemas seen more than once * (excluding the root), assigns each a unique name, and emits a draft-07 JSON Schema * with a $defs section. Cycles always become $refs. * * @public */ export declare function toJsonSchema(schema: HashbrownType): any; //# sourceMappingURL=to-json-schema.d.ts.map