JSPM

stringify-parameters

0.0.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 84639
    • Score
      100M100P100Q160662F
    • License MIT

    Stringifies function's parameters definition

    Package Exports

    • stringify-parameters

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stringify-parameters) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    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

    CLI via npx

    npx stringify-parameters

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