index.js
function transformFile(contents) {
        var $ = cheerio.load(contents.toString());
        var result = [];
        $(options.selector).each(function() {
            var element = $(this);
            var fileName = options.getFileName(element);
            result.push(fileName);
        });

        return result;
    }
function transformFile(contents) {
        var $ = cheerio.load(contents.toString());
        var result = [];
        $(options.selector).each(function() {
            var element = $(this);
            var fileName = options.getFileName(element);
            result.push(fileName);
        });

        return result;
    }
function transformFile ( contents ) { var $ = cheerio . load ( contents . toString ( ) ) ; var result = [ ] ; $ ( options . selector ) . each ( function ( ) { var element = $ ( this ) ; var fileName = options . getFileName ( element ) ; result . push ( fileName ) ; } ) ; return result ; }
Returns an array of matched files - empty if no file is found.
@param contents
@returns {Array}
Returns an array of matched files - empty if no file is found .