mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 09:00:10 +00:00
add replaceAll polyfill
This commit is contained in:
parent
0d4747e8e9
commit
3294b27029
@ -13,6 +13,11 @@ const hasDark = (item) => {
|
||||
return false;
|
||||
};
|
||||
|
||||
if (typeof String.prototype.replaceAll === "undefined") {
|
||||
String.prototype.replaceAll = function(match, replace) {
|
||||
return this.replace(new RegExp(match, 'g'), () => replace);
|
||||
}
|
||||
}
|
||||
|
||||
function fixHTML(infile, outfile) {
|
||||
let f = fs.readFileSync(infile).toString();
|
||||
|
Loading…
Reference in New Issue
Block a user