src/utils/npm-audit-package.js
function isSensitiveData(filepath, allSensitiveDataPatterns) {
    if (
        filepath &&
        allSensitiveDataPatterns &&
        allSensitiveDataPatterns.ignoredData &&
        globMatching.any(filepath, allSensitiveDataPatterns.ignoredData, {
            matchBase: true,
            nocase: true,
        })
    ) {
        return false;
    }

    if (
        filepath &&
        allSensitiveDataPatterns &&
        allSensitiveDataPatterns.sensitiveData &&
        globMatching.any(filepath, allSensitiveDataPatterns.sensitiveData, {
            matchBase: true,
            nocase: true,
        })
    ) {
        return true;
    }
    return false;
}
function isSensitiveData(filepath, allSensitiveDataPatterns) {
    if (
        filepath &&
        allSensitiveDataPatterns &&
        allSensitiveDataPatterns.ignoredData &&
        globMatching.any(filepath, allSensitiveDataPatterns.ignoredData, {
            matchBase: true,
            nocase: true,
        })
    ) {
        return false;
    }

    if (
        filepath &&
        allSensitiveDataPatterns &&
        allSensitiveDataPatterns.sensitiveData &&
        globMatching.any(filepath, allSensitiveDataPatterns.sensitiveData, {
            matchBase: true,
            nocase: true,
        })
    ) {
        return true;
    }
    return false;
}
function isSensitiveData ( filepath , allSensitiveDataPatterns ) { if ( filepath && allSensitiveDataPatterns && allSensitiveDataPatterns . ignoredData && globMatching . any ( filepath , allSensitiveDataPatterns . ignoredData , { matchBase : true , nocase : true , } ) ) { return false ; } if ( filepath && allSensitiveDataPatterns && allSensitiveDataPatterns . sensitiveData && globMatching . any ( filepath , allSensitiveDataPatterns . sensitiveData , { matchBase : true , nocase : true , } ) ) { return true ; } return false ; }
Check if file in filepath is sensitive data
@param {string} filepath
@param {DefaultSensitiveData} allSensitiveDataPatterns
@returns {boolean}
Check if file in filepath is sensitive data