replace-in-file
Advanced tools
Comparing version 2.6.2 to 2.6.3
@@ -55,2 +55,5 @@ 'use strict'; | ||
} | ||
if (typeof config.ignore === 'undefined') { | ||
config.ignore = []; | ||
} | ||
@@ -57,0 +60,0 @@ //Use default encoding if invalid |
@@ -726,3 +726,16 @@ 'use strict'; | ||
}); | ||
it('should not fail when the ignore parameter is undefined', () => { | ||
replace.sync({ | ||
files: 'test*', | ||
ignore: undefined, | ||
from: /re\splace/g, | ||
to: 'b', | ||
}); | ||
const test1 = fs.readFileSync('test1', 'utf8'); | ||
const test2 = fs.readFileSync('test2', 'utf8'); | ||
expect(test1).to.equal('a b c'); | ||
expect(test2).to.equal('a b c'); | ||
}); | ||
}); | ||
}); |
{ | ||
"name": "replace-in-file", | ||
"version": "2.6.2", | ||
"version": "2.6.3", | ||
"description": "A simple utility to quickly replace text in one or more files.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/adamreisnz/replace-in-file#readme", |
141371
1035