Use list for cloak entries

This commit is contained in:
Tim Schaub
2018-04-23 20:51:01 -06:00
parent 9bdece3573
commit 1551bfffe0
32 changed files with 66 additions and 34 deletions

View File

@@ -151,8 +151,8 @@ ExampleBuilder.prototype.render = async function(dir, chunk) {
}
}
if (data.cloak) {
for (const key in data.cloak) {
jsSource = jsSource.replace(new RegExp(key, 'g'), data.cloak[key]);
for (const entry of data.cloak) {
jsSource = jsSource.replace(new RegExp(entry.key, 'g'), entry.value);
}
}
data.js = {