pc__search_methods_in_js

0.0.1 • Public • Published

Search names of methods in JS

This is plugin for nmp-package "Post-Compression".
He's searching for the names of methods in the JS code.

An example of using:

var searchMethodsInJS = require("pc__search_methods_in_js"),
    uniqueNames = {};
 
gulp.src("./*.html")
    .pipe(postCompression.replace([
        searchMethodsInJS()
    ], uniqueNames));  

Where:

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

An example of JS code:

...for(t=0;a>t;t++)r[t]&&r[t].someMethodNameA&&r[t].someMethodNameB.call(this);delete n.someMethodNameA...

An example of a result searching:

{
    "someMethodNameA": 2,
    "someMethodNameB": 1
}

Package Sidebar

Install

npm i pc__search_methods_in_js

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • bakhirev