mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
add replaceAll polyfill
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user