lib/index.js
function getExcerptByMoreTag(file, regExp) {
    var excerpt = false,
        contents = file.contents.toString();
    contents = cheerio.load('<root>' + contents + '</root>', {decodeEntities: false})('root').html();
    var match = contents.search(regExp);
    if (match > -1) {
        excerpt = contents.slice(0, match);
        excerpt = v.unescapeHtml(excerpt);
    }
    return excerpt;
}
function getExcerptByMoreTag(file, regExp) {
    var excerpt = false,
        contents = file.contents.toString();
    contents = cheerio.load('<root>' + contents + '</root>', {decodeEntities: false})('root').html();
    var match = contents.search(regExp);
    if (match > -1) {
        excerpt = contents.slice(0, match);
        excerpt = v.unescapeHtml(excerpt);
    }
    return excerpt;
}
function getExcerptByMoreTag ( file , regExp ) { var excerpt = false , contents = file . contents . toString ( ) ; contents = cheerio . load ( '<root>' + contents + '</root>' , { decodeEntities : false } ) ( 'root' ) . html ( ) ; var match = contents . search ( regExp ) ; if ( match > - 1 ) { excerpt = contents . slice ( 0 , match ) ; excerpt = v . unescapeHtml ( excerpt ) ; } return excerpt ; }
retrieve excerpt from file object by extracting contents until a 'more' tag

@param  {Object} file   file object
@param  {RegExp} regExp 'more' tag regexp
@return {mixed}         excerpt string or false
retrieve excerpt from file object by extracting contents until a more tag