stringify-parameters

0.0.7 • Public • Published

stringify-parameters

Build Status

Stringifies function's parameters definition. Useful to create automated tasks, intellisense, .

Installation

npm install stringify-parameters

CLI

npm install stringify-parameters -g
npx stringify-parameters --help

Usage

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);

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.72,696latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.72,696
0.0.61
0.0.50
0.0.4102,430
0.0.33
0.0.20
0.0.10

Package Sidebar

Install

npm i stringify-parameters

Weekly Downloads

105,130

Version

0.0.7

License

MIT

Unpacked Size

6.86 kB

Total Files

7

Last publish

Collaborators

  • diegozoracky