MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / getTextOutputValue

Function getTextOutputValue

src/kernels/execution/helpers.ts:625–636  ·  view source on GitHub ↗
(output: NotebookCellOutput)

Source from the content-addressed store, hash-verified

623}
624
625export function getTextOutputValue(output: NotebookCellOutput): string {
626 const items =
627 output?.items?.filter(
628 (opit) =>
629 opit.mime === CellOutputMimeTypes.stdout ||
630 opit.mime === CellOutputMimeTypes.stderr ||
631 opit.mime === 'text/plain' ||
632 opit.mime === 'text/markdown'
633 ) || [];
634
635 return items.map((item) => convertOutputMimeToJupyterOutput(item.mime, item.data as Uint8Array)).join('');
636}
637export function getTextOutputValues(cell: NotebookCell): string {
638 return cell.outputs.map(getTextOutputValue).join('');
639}

Calls 4

filterMethod · 0.80
joinMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected