named

simple wrapper for generating functions with named parameters

named

A simple wrapper for generating functions with named parameters.

Create a named function by calling named on a function definition. The names of its arguments will determine the names of the parameters it will receive.

var named = require('named');
 
var pow = named(function (baseexponent) {
  return Math.pow(base, exponent);
});

Call the resulting function with a single object: a hash of parameter name to value.

pow({ base: 2, exponent: 3 }); // = 8 
npm install --dev
npm test

Licensed under the MIT License. See the LICENSE file for the full text.