Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
featureWasEnabled() {
if (this.runtime.isNode) {
this.runtime.hide('vm', require('vm'))
} else {
const vmBrowserify = require('vm-browserify')
this.runtime.hide(
'vm',
vmBrowserify.createContext ? vmBrowserify : vmBrowserify.default || vmBrowserify
)
}
}
}