I have this gulp task
gulp.src([`../../**/*.js`].concat(dontCheck.map(p => '!../../' + p)))
.pipe(gulpPrint(path => {
let adjusted = path.replace('..\\..\\', '').replace(/\\/g, '/');
let target = 'account/account.js';
if (adjusted == target){
console.log('FOUND');
} else {
console.log('NOT FOUND', '|' + target + '|', '|' + adjusted + '|', String(target) == String(adjusted), typeof target, typeof adjusted);
}
And I'm getting this maddening output
Why aren't those strings matching? Does adjusted
have a different unicode encoding? If so how do I reconcile it?