MCPcopy Create free account
hub / github.com/deepnote/deepnote / isComposedInitMainFile

Function isComposedInitMainFile

packages/convert/src/snapshot/file-shape.ts:13–21  ·  view source on GitHub ↗
(file: SnapshotNotebookIdFileInput)

Source from the content-addressed store, hash-verified

11 * that matches one of them.
12 */
13export function isComposedInitMainFile(file: SnapshotNotebookIdFileInput): boolean {
14 const { notebooks, initNotebookId } = file.project
15 if (notebooks.length !== 2 || initNotebookId === undefined) {
16 return false
17 }
18 const initNotebook = notebooks.find(notebook => notebook.id === initNotebookId)
19 const nonInit = notebooks.find(notebook => notebook.id !== initNotebookId)
20 return initNotebook !== undefined && nonInit !== undefined
21}

Callers 1

file-shape.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected