lib/rules/capitalized-comments.js
function createRegExpForIgnorePatterns(normalizedOptions) {
    Object.keys(normalizedOptions).forEach(key => {
        const ignorePatternStr = normalizedOptions[key].ignorePattern;

        if (ignorePatternStr) {
            const regExp = RegExp(`^\\s*(?:${ignorePatternStr})`, "u");

            normalizedOptions[key].ignorePatternRegExp = regExp;
        }
    });
}
function createRegExpForIgnorePatterns(normalizedOptions) {
    Object.keys(normalizedOptions).forEach(key => {
        const ignorePatternStr = normalizedOptions[key].ignorePattern;

        if (ignorePatternStr) {
            const regExp = RegExp(`^\\s*(?:${ignorePatternStr})`, "u");

            normalizedOptions[key].ignorePatternRegExp = regExp;
        }
    });
}
function createRegExpForIgnorePatterns ( normalizedOptions ) { Object . keys ( normalizedOptions ) . forEach ( key => { const ignorePatternStr = normalizedOptions [ key ] . ignorePattern ; if ( ignorePatternStr ) { const regExp = RegExp ( ` \\ ${ ignorePatternStr } ` , "u" ) ; normalizedOptions [ key ] . ignorePatternRegExp = regExp ; } } ) ; }
Creates a regular expression for each ignorePattern defined in the rule
options.

This is done in order to avoid invoking the RegExp constructor repeatedly.

@param {Object} normalizedOptions The normalized rule options.
@returns {void}
Creates a regular expression for each ignorePattern defined in the rule options .