INNER CODE UNIT · JavaScript
filteredEntries
moderndive/ModernDive_book · _extensions/webr/qwebr-cell-initialization.js:14
const filteredEntries = qwebrCellDetails.filter(entry => {
const contextOption = entry.options && entry.options.context;
return ['output', 'setup'].includes(contextOption) || (contextOption == "interactive" && entry.options && entry.options.autorun === 'true');
});
// Condition non-interactive cells to only be run after webR finishes its initialization.
qwebrInstance.then(
async () => {
const nHiddenCells = filteredEntries.length;
var currentHiddenCell = 0;
// Modify button state
qwebrSetInteractiveButtonState(`🟡 Running hidden code cells ...`, false);
// Begin processing non-interactive sections
// Due to the iteration policy, we must use a for() loop.
// Otherwise, we would need to switch to using reduce with an empty