wrap-exec

Wrap function calls with specified function

Usage no npm install needed!

<script type="module">
  import wrapExec from 'https://cdn.skypack.dev/wrap-exec';
</script>

README

wrap-exec

Wrap function calls with specified function

Installation

$ npm i wrap-exec

Usage

import wrapExec from 'wrap-exec';

const log = console.log.bind(console);

eval(wrapExec('log', 'function add(a, b) { return a + b; } add(1, 2);')); // 3