https://github.com/Siubaak/sval
import Sval from 'sval'
// Sval options
const options = {
// ECMA Version of the code (5 | 6 | 7 | 8 | 9 | 10 | 2015 | 2016 | 2017 | 2018 | 2019)
ecmaVer: 9,
// Whether the code runs in a sandbox
sandBox: true,
}
// Create a interpreter
const interpreter = new Sval(options)
// Add global modules in interpreter
interpreter.import('importWhatYouNeed', 'AllKindsOfStuffs')
// Or interpreter.import({ importWhatYouNeed: 'AllKindsOfStuffs' })