pc__search_words_in_js

This is plugin for nmp-package "Post-Compression". He is searching the words and sequence of letters in the JS code.

Usage no npm install needed!

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

README

Search words and sequence of letters in JS

This is plugin for nmp-package "Post-Compression".
He is searching the words and sequence of letters in the JS code.

An example of using:

var searchWordsInJs = require("pc__search_words_in_js"),
    uniqueNames = {};

gulp.src("./*.js")
    .pipe(postCompression.search([
        searchWordsInJs()
    ], uniqueNames));  

Where:

  • uniqueNames - an object of type JSON with rules replace the long words to short words.

An example of JS code:

...e.core||{}}};e._createScope();for(...

An example of a result searching:

{
    "e": 2,
    "for": 1,
    "core": 1,
    "_createScope": 1
}