g-apply

Apply the parameters synchronously to all the functions, and returns the result of the last function

Usage no npm install needed!

<script type="module">
  import gApply from 'https://cdn.skypack.dev/g-apply';
</script>

README

g-apply

A simple utility that applies the, function's parameter to series of function serially and returns only the last function result.

Ex:

function foo(num) {
  console.log('just logging foo: ', num);
}

function bar(num) {
  return num + 2;
}

console.log(apply([foo, bar])(5));
// just logging foo: 5
// 7