Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// from === "code"
if (from === "code") {
nextState = cleanCellTransient(
state
.deleteIn(["notebook", "cellMap", id, "execution_count"])
.deleteIn(["notebook", "cellMap", id, "outputs"]),
id
);
}
switch (to) {
case "code":
return nextState.setIn(
["notebook", "cellMap", id],
makeCodeCell({
source: cell.source
})
);
case "markdown":
return nextState.setIn(
["notebook", "cellMap", id],
makeMarkdownCell({
source: cell.source
})
);
case "raw":
return nextState.setIn(
["notebook", "cellMap", id],
makeRawCell({
source: cell.source
})