@putout/operator-add-argument
putout operator adds ability to add argument to referenced variables that wan not defined
Last updated 4 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/operator-add-argument 
SYNC missed versions from official npm registry.

@putout/operator-add-argument NPM version

putout operator adds ability to add-argument variable that was not defined before. Renamed to @putout/operator-add-args.

Install

npm i putout @putout/operator-add-argument

API

If you want to create putout plugin that will add-argument variables according to your needs just:

const {operator} = require('putout');

const {addArgument} = operator;

module.exports = addArgument({
    comparePlaces: ['{comparePlaces}', 'test("__a", (__args) => __body)'],
});

If you have a file index.spec.js:

-test('', () => {
+test('', ({comparePlaces}) => {
    comparePlaces();
});

Plugin supports options, so you can pass it in .putout.json:

{
    "rules": {
        "tape/declare-t": ["on", {
            "declarations": {
                "comparePlaces": ["{comparePlaces}", "test('__a', (__args) => __body)"]
            }
        }]
    }
}

License

MIT

Current Tags

  • 1.3.5                                ...           latest (4 years ago)

9 Versions

  • 1.3.5                                ...           4 years ago
  • 1.3.4                                ...           4 years ago
  • 1.3.3                                ...           4 years ago
  • 1.3.2                                ...           4 years ago
  • 1.3.1                                ...           4 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (10)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |