Mech CODE Block

Our intention is to dynamically construct and import a module from text on the wiki page. Eric Dobbs demonstrated this technique which we've used on occasion. github

In JavaScript, sandboxes are typically used to isolate and control the execution environment of code to ensure that it runs in a secure and restricted environment, avoiding potential damage to the main environment. post

Our first test case will be a CODE block that creates Reference items for all pages in a neighborhood.

CLICK NEIGHBORS next CODE PREVIEW synopsis items

export default function () { this.items = this.neighborhood.map(info => ({ type:"reference", site:info.domain, slug:info.slug, title:info.title, text:info.synopsis})) return 'done' }