Makefile.js
function isPermissible(dependency) {
        const licenses = dependency.licenses;

        if (Array.isArray(licenses)) {
            return licenses.some(license => isPermissible({
                name: dependency.name,
                licenses: license
            }));
        }

        return OPEN_SOURCE_LICENSES.some(license => license.test(licenses));
    }
function isPermissible(dependency) {
        const licenses = dependency.licenses;

        if (Array.isArray(licenses)) {
            return licenses.some(license => isPermissible({
                name: dependency.name,
                licenses: license
            }));
        }

        return OPEN_SOURCE_LICENSES.some(license => license.test(licenses));
    }
function isPermissible ( dependency ) { const licenses = dependency . licenses ; if ( Array . isArray ( licenses ) ) { return licenses . some ( license => isPermissible ( { name : dependency . name , licenses : license } ) ) ; } return OPEN_SOURCE_LICENSES . some ( license => license . test ( licenses ) ) ; }
Check if a dependency is eligible to be used by us
@param {Object} dependency dependency to check
@returns {boolean} true if we have permission
@private
Check if a dependency is eligible to be used by us