Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await NOTEPAD_STORAGE.iterate((json: string) => {
let shell: NotepadShell;
try {
shell = JSON.parse(json);
} catch (ignored) {
return;
}
notepads.push(
Translators.Json.toFlatNotepadFromNotepad(shell, passkeys[shell.title])
.catch(e =>
console.warn(`Couldn't parse notepad: ${e}`)
)
);
return;
});
readFileInputEventAsText(event).then(json => {
insertElement({
type: 'markdown',
args: {} as ElementArgs,
content: Translators.Json.toMarkdownFromJupyter(json)
});
}).catch(err => {
console.error(err);