Skip to content

confine-sandbox/jsisolate-confine-runtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JS Isolate Confine Runtime

Confine runtime: Runs javascript in an isolate using isolated-vm.

Install:

npm i jsisolate-confine-runtime

Typically this should be passed into Confine, but here are the constructor options:

const runtime = new JsIsolateConfineRuntime({
  source: ArrayBuffer, // script source
  path: string, // the path to the script
  env: 'vanilla' | 'nodejs',
  module: 'cjs' | 'esm',
  globals: {
    // ... any globals you want to define
  },
  cjs: {
    requires: {
      // ... any require overrides you want to define
      // a map of 'module-name' -> 'path'
    }
  },
  esm: {
    disableImports: boolean // disallow imports?
  }
})

About

Confine runtime: Runs javascript in a separate isolate.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published