lib/index.js
function checkModuleLicense(folder) {

    var licensePath = folder + "/LICENSE",
        readMePath = folder + "/README.md",
        licenseContent;

    //check for LICENSE File First
    if(fs.existsSync(licensePath)){
        licenseContent = fs.readFileSync(licensePath, "utf-8");
        return { isMIT : isLicense.mit(licenseContent), content : licenseContent };
    }
    //Maybe in the README
    else if(fs.existsSync(readMePath)) {
        licenseContent = fs.readFileSync(readMePath, "utf-8");
        return { isMIT : isLicense.mit(licenseContent), content : "Check the README" };
    }
    else {
        return { isMIT : false, content : "not found" };
    }
}
function checkModuleLicense(folder) {

    var licensePath = folder + "/LICENSE",
        readMePath = folder + "/README.md",
        licenseContent;

    //check for LICENSE File First
    if(fs.existsSync(licensePath)){
        licenseContent = fs.readFileSync(licensePath, "utf-8");
        return { isMIT : isLicense.mit(licenseContent), content : licenseContent };
    }
    //Maybe in the README
    else if(fs.existsSync(readMePath)) {
        licenseContent = fs.readFileSync(readMePath, "utf-8");
        return { isMIT : isLicense.mit(licenseContent), content : "Check the README" };
    }
    else {
        return { isMIT : false, content : "not found" };
    }
}
function checkModuleLicense ( folder ) { var licensePath = folder + "/LICENSE" , readMePath = folder + "/README.md" , licenseContent ; //check for LICENSE File First if ( fs . existsSync ( licensePath ) ) { licenseContent = fs . readFileSync ( licensePath , "utf-8" ) ; return { isMIT : isLicense . mit ( licenseContent ) , content : licenseContent } ; } //Maybe in the README else if ( fs . existsSync ( readMePath ) ) { licenseContent = fs . readFileSync ( readMePath , "utf-8" ) ; return { isMIT : isLicense . mit ( licenseContent ) , content : "Check the README" } ; } else { return { isMIT : false , content : "not found" } ; } }
checks the License of a single module-folder

@param folder
@return {Object}
checks the License of a single module - folder