namedparams
v0.0.6
Published
for naming function parameters for convenience
Downloads
2
Maintainers
Readme
namedparams
Installation:
npm i namedparams
Usage:
var name = require('namedparams');
const addOrderedArrays = (a, b) => a.map((elem, i) => elem + ' : ' + b[i]);
const namedAddOrderedArrays = name(addOrderedArrays, 'first', 'second');
//Naming pulls all the elements into an array,
namedAddOrderedArrays('second', 10, 3, 7, 'first', 1, 2, 4, 'second', 6, 'first', 8);
//[ '1 : 10', '2 : 3', '4 : 7', '8 : 6' ]
Created by Julian Knodt
MIT