Created 17 Aug 2018
This is a simple installation that I did on my Raspberry Pi. Of course, this is only one of the many reasons to do it.
Here are my requirements:
const repl = require('repl'); | |
const babel = require('babel-core'); | |
function preprocess(input) { | |
const awaitMatcher = /^(?:\s*(?:(?:let|var|const)\s)?\s*([^=]+)=\s*|^\s*)(await\s[\s\S]*)/; | |
const asyncWrapper = (code, binder) => { | |
let assign = binder ? `global.${binder} = ` : ''; | |
return `(function(){ async function _wrap() { return ${assign}${code} } return _wrap();})()`; | |
}; |