aboutsummaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/utils/re.js6
-rw-r--r--src/shared/validators/setting.js2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/shared/utils/re.js b/src/shared/utils/re.js
new file mode 100644
index 0000000..7db9091
--- /dev/null
+++ b/src/shared/utils/re.js
@@ -0,0 +1,6 @@
+const fromWildcard = (pattern) => {
+ let regexStr = '^' + pattern.replace(/\*/g, '.*') + '$';
+ return new RegExp(regexStr);
+};
+
+export { fromWildcard };
diff --git a/src/shared/validators/setting.js b/src/shared/validators/setting.js
index 5039ec2..949ab29 100644
--- a/src/shared/validators/setting.js
+++ b/src/shared/validators/setting.js
@@ -1,6 +1,6 @@
import operations from 'shared/operations';
-const VALID_TOP_KEYS = ['keymaps', 'search'];
+const VALID_TOP_KEYS = ['keymaps', 'search', 'blacklist'];
const VALID_OPERATION_VALUES = Object.keys(operations).map((key) => {
return operations[key];
});