Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.58 KB

README.md

File metadata and controls

32 lines (26 loc) · 1.58 KB

panto-transformer-replace

NPM version Downloads Build Status Dependency status Dev Dependency status Coverage Status

Replace transformer for panto.

It uses replacestream to replace and receives the same syntax.

panto.loadTransformer('replace');

panto.pick('**/*.js').replace({
    replacements: [
                    [/\bfoo\b/, 'bar'],
                    [/(\d[4]-\d[2]-d[2])/, '$2/$3/$1']
                ]
});

options

  • replacements: Array