BridgingHeader.prototype.removeHeader = function()

in lib/BridgingHeader.js [37:51]


BridgingHeader.prototype.removeHeader = function (plugin_id, header_path) {
    this.bridgingHeaders = this.bridgingHeaders.filter(function (line) {
        if (this.found) {
            return true;
        }
        if (line.type === 'code') {
            const re = new RegExp(`#import\\s+"${preg_quote(header_path)}"(\\s*|\\s.+)(\\n|$)`);
            if (re.test(line.code)) {
                this.found = true;
                return false;
            }
        }
        return true;
    }, { found: false });
};