0.0.1 • Published 8 years ago

pc__search_words_in_js v0.0.1

Weekly downloads
6
License
-
Repository
github
Last release
8 years ago

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
}