docker-js-eval

0.0.2 • Public • Published

js-eval

echo '{ "environment": "node-cjs", code: "1 + 1" }' | docker run -i js-eval
2
const run = require('docker-js-eval');
 
run('1 + 1', 'node-cjs', { memory: '8m' }).then(console.log) // 2

Environments:

  • node-cjs Like evaluating a normal Node.js CommonJS module
  • node-esm Coming soon
  • module Evaluates as an ES Module
  • script Evaluates as an ES Script

Readme

Keywords

none

Package Sidebar

Install

npm i docker-js-eval

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

5.11 kB

Total Files

6

Last publish

Collaborators

  • snek