argnames

print function arguments with original names

Usage no npm install needed!

<script type="module">
  import argnames from 'https://cdn.skypack.dev/argnames';
</script>

README

argnames

console.log(arguments) replacement

usage:

var argnames = require('argnames');
function test(wow, such, args, here) {
  // code code
  argnames.dump();
  // code.code
}

test('foo', 'bar', 1, {});

prints

{ wow: 'foo',
  such: 'bar',
  args: 1,
  here: {} }

see also

https://github.com/ifit/Argue