UNPKG

@graphql-hive/laboratory

Version:

19 lines (18 loc) 785 B
import { ClassValue } from 'clsx'; export declare function cn(...inputs: ClassValue[]): string; export declare function capitalize(str: string): string; export declare function splitIdentifier(input: string): string[]; export declare function asyncInterval(fn: () => Promise<void>, delay: number, signal?: AbortSignal): Promise<void>; export declare function isAsyncIterable<T>(val: unknown): val is AsyncIterable<T>; export type TextToken = { type: 'text'; value: string; } | { type: 'url'; value: string; }; /** * Split text into plain-text and http(s) URL tokens, preserving all original characters * (incl. newlines/whitespace). Only https?:// is matched, so javascript:/data: can't be linked. */ export declare function tokenizeUrls(text: string): TextToken[];