stringify-parameters
v0.0.7
Published
Stringifies function's parameters definition
Downloads
317,984
Maintainers
Readme
stringify-parameters
Stringifies function's parameters definition. Useful to create automated tasks, intellisense, .
Installation
npm install stringify-parametersCLI
npm install stringify-parameters -gnpx stringify-parameters --helpUsage
stringifyParameters(fn);
Where fn is a function reference or a function definition stringified (e.g. fn.toString())
const stringifyParameters = require('stringify-parameters');
// Just a function to test
const testFunction = (a = "z", b = [1,2,3], c, {d,e: {f}, g} = {}) => console.log("noop");
// `result` will be: 'a = "z, b = [1,2,3], c, {d,e: {f}, g} = {}'
const result = stringifyParameters(testFunction);