UNPKG

libvms

Version:

API for running cryptographically auditable VMs.

20 lines (18 loc) 292 B
const WHITELIST = [ 'getInfo', 'stat', 'readFile', 'readdir', 'writeFile', 'mkdir', 'unlink', 'rmdir', 'history' ] module.exports = function (archive) { var wrapper = {} WHITELIST.forEach(k => { wrapper[k] = (...args) => archive[k](...args) }) return wrapper }