Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marius-wieschollek/passwords-webextension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/NextSearch/Field/FieldNotIn.js')
-rw-r--r--src/js/NextSearch/Field/FieldNotIn.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/js/NextSearch/Field/FieldNotIn.js b/src/js/NextSearch/Field/FieldNotIn.js
new file mode 100644
index 0000000..ffa73e5
--- /dev/null
+++ b/src/js/NextSearch/Field/FieldNotIn.js
@@ -0,0 +1,23 @@
+import AbstractSearchField from '@js/NextSearch/Field/AbstractSearchField';
+
+export default class FieldNotIn extends AbstractSearchField {
+
+ get TYPE() {
+ return 'notIn';
+ }
+
+ /**
+ * @inheritDoc
+ */
+ evaluate(item) {
+ let value = item.getProperty(this._name);
+
+ if(!value) return {matches: 1, checks: 1, passed: true};
+
+ if(this._value.indexOf(value) !== -1) {
+ return {passed: false};
+ }
+
+ return {matches: 1, checks: 1, passed: true};
+ }
+} \ No newline at end of file