Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit c1ea957

Browse files
committed
Standardise query comparisons to match iterator
1 parent 7cae785 commit c1ea957

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib/orbitdb-api.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ class OrbitdbAPI extends Express {
9595
this.put('/db/:dbname/inc/:val', db_inc_val);
9696

9797
var comparisons = {
98-
'!=': (a, b) => a != b,
99-
'==': (a, b) => a == b,
100-
'>': (a, b) => a > b ,
101-
'<': (a, b) => a < b ,
102-
'>=': (a, b) => a >= b,
103-
'<=': (a, b) => a <= b,
104-
'%': (a, b, c) => a % b == c,
105-
'*': () => true
98+
'ne': (a, b) => a != b,
99+
'eq': (a, b) => a == b,
100+
'gt': (a, b) => a > b,
101+
'lt': (a, b) => a < b,
102+
'gte': (a, b) => a >= b,
103+
'lte': (a, b) => a <= b,
104+
'mod': (a, b, c) => a % b == c,
105+
'all': () => true
106106
};
107107

108108
this.get('/db/:dbname/query', asyncMiddleware( async (req, res, next) => {

0 commit comments

Comments
 (0)