How to use the putout.identifier function in putout

To help you get started, we’ve selected a few putout examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github coderaiser / putout / packages / plugin-madrun / lib / call-run / index.js View on Github external
module.exports.fix = ({path, value}) => {
    const [line, arg] = value.split(' -- ');
    const scripts = getScripts(line);
    
    const strs = [];
    for (const script of scripts) {
        strs.push(stringLiteral(script));
    }
    
    const runArgs = getRunArgs(strs, arg);
    
    path.node.body = callExpression(identifier('run'), runArgs);
};
github coderaiser / putout / packages / plugin-convert-arguments-to-rest / lib / convert-arguments-to-rest.js View on Github external
module.exports.fix = ({path, fnPath}) => {
    fnPath.node.params = [
        spreadElement(identifier('args')),
    ];
    
    path.node.name = 'args';
};