@graphql-hive/laboratory
Version:
[Hive](https://the-guild.dev/graphql/hive) is a fully open-source schema registry, analytics, metrics and gateway for [GraphQL federation](https://the-guild.dev/graphql/hive/federation) and other GraphQL APIs.
21 lines (20 loc) • 921 B
TypeScript
import { ClassValue } from 'clsx';
export declare function cn(...inputs: ClassValue[]): string;
export declare function capitalize(str: string): string;
/** Formats a byte count for display, e.g. 0 -> "0 B", 1536 -> "1.5 KB". */
export declare function formatBytes(bytes: number): 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[];