INNER CODE UNIT · JavaScript

paged_data

moderndive/ModernDive_book · _extensions/webr/qwebr-compute-engine.js:62

    const paged_data = await mainWebR.FS.readFile(path).then((data) => {
        // Obtain the file content
        let content = new TextDecoder().decode(data);

        // Remove excessive backspace characters until none remain
        while(content.match(/.[\b]/)){
            content = content.replace(/.[\b]/g, '');
        }

        // Returned cleaned data
        return content;
    });

    // Unlink file if needed
    if (deleteFile) {
        await mainWebR.FS.unlink(path);
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…