node-version-call

Call a function in a specific version of node

import call from "node-version-call";

const result = call("0.8", "path/to/file.js", "arg1", 2);
console.log(result); // return value
var call = require("node-version-call"); // old js calling lts js

var result = call("lts", "path/to/file.js", "arg1", 2);
console.log(result); // return value

API Docs