pc__replace_call_chain

This is plugin for nmp-package "Post-Compression". He`s searching for and collects chains of calls methods in one line in the JS code.

Usage no npm install needed!

<script type="module">
  import pcReplaceCallChain from 'https://cdn.skypack.dev/pc__replace_call_chain';
</script>

README

Replace words in JS

This is plugin for nmp-package "Post-Compression".
He`s searching for and collects chains of calls methods in one line in the JS code.

An example of using:

var replaceCallChain = require("pc__replace_call_chain");

gulp.src("./*.js")
    .pipe(postCompression.replace([
         replaceCallChain()
    ]));

An example of JS code before:

this.methodA();
this.methodB();
this.methodC();

An example of JS code after:

this.methodA().methodB().methodC();