summaryrefslogtreecommitdiff
path: root/scripts/style-code.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/style-code.js')
-rw-r--r--scripts/style-code.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/style-code.js b/scripts/style-code.js
index 156934a240..70914c5fb6 100644
--- a/scripts/style-code.js
+++ b/scripts/style-code.js
@@ -22,6 +22,10 @@ global.snakeCaseUpper = function snakeCaseUpper(str) {
return str.replace(/-/g, "_").toUpperCase();
};
+global.unhyphenate = function (str) {
+ return str.replace(/-/g, " ");
+};
+
global.writeIfModified = function(filename, newContent) {
try {
const oldContent = fs.readFileSync(filename, 'utf8');