(output: NotebookCellOutput)
| 623 | } |
| 624 | |
| 625 | export 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 | } |
| 637 | export function getTextOutputValues(cell: NotebookCell): string { |
| 638 | return cell.outputs.map(getTextOutputValue).join(''); |
| 639 | } |
no test coverage detected