function extractLicenseName()

in lib/LicenseFinder.js [35:46]


    function extractLicenseName(fileName) {
        if (grunt.file.exists(fileName)) {
            var text = grunt.file.read(fileName, { encoding: 'UTF-8' });
            var type = _(LICENSE_REGEXES).find(function(regex) {
                return regex[0].test(text);
            });
            if (type != null) {
                return type[1]; // index 0 is the regex, index 1 is the replacement (see LICENSE_REGEXES)
            }
        }
        return null;
    }