UNPKG

nbtx

Version:

Jupyter Notebook Translators: Transform Jupyter notebook JSON files (*.ipynb) to and from more compact data structures for use in web applications or other contexts where loading component parts (e.g. images, data, etc.) is preferred.

14 lines (13 loc) 836 B
import type { MinifiedErrorOutput, MinifiedMimePayload, MinifiedOutput, MinifiedStreamOutput } from './types.js'; export declare const MAX_CHARS = 25000; export declare const TRUNCATED_CHARS_COUNT = 64; export declare function DEFAULT_HASH_WARNING(content: string): string; export declare function isNotNull<T>(arg: T | null): arg is T; export declare function ensureSafePath(path: string): string; /** * Given a list of minified outputs, perform a function on each * * This function traverses into mime outputs which may have multiple outputs included together. */ export declare function walkOutputs(outputs: MinifiedOutput[], func: (obj: MinifiedStreamOutput | MinifiedErrorOutput | MinifiedMimePayload) => void): void; export declare function ensureString(maybeString: string[] | string | undefined, joinWith?: string): string;