index.js
function crawlScripts(result, $, endCallback) {

    if (! result.scripts) {
      return endCallback();
    }

    log.debug({"url" : result.url, "step" : "analyzeHTML", "message" : "CrawlScripts"});

    async.each($('script'), function(script, callback) {
        crawlScript($, result, script, callback);
    }, endCallback);
}
function crawlScripts(result, $, endCallback) {

    if (! result.scripts) {
      return endCallback();
    }

    log.debug({"url" : result.url, "step" : "analyzeHTML", "message" : "CrawlScripts"});

    async.each($('script'), function(script, callback) {
        crawlScript($, result, script, callback);
    }, endCallback);
}
function crawlScripts ( result , $ , endCallback ) { if ( ! result . scripts ) { return endCallback ( ) ; } log . debug ( { "url" : result . url , "step" : "analyzeHTML" , "message" : "CrawlScripts" } ) ; async . each ( $ ( 'script' ) , function ( script , callback ) { crawlScript ( $ , result , script , callback ) ; } , endCallback ) ; }
Crawl script tags found in the HTML page

@param The HTTP response with the crawl options
@param the jquery like object for accessing to the HTML tags.
@param callback()
Crawl script tags found in the HTML page