aboutsummaryrefslogtreecommitdiff
path: root/lib/binops.js
diff options
context:
space:
mode:
authorBen Burwell <ben.burwell@trifecta.com>2016-09-14 12:30:04 -0400
committerBen Burwell <ben.burwell@trifecta.com>2016-09-14 12:30:04 -0400
commitfd5817a6bb3185314540825e3d665e94ffe188c0 (patch)
tree9b35138a18122ebfcb5cfa41ac0eadd27cb2c002 /lib/binops.js
Initial commit
Diffstat (limited to 'lib/binops.js')
-rw-r--r--lib/binops.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/binops.js b/lib/binops.js
new file mode 100644
index 0000000..a709097
--- /dev/null
+++ b/lib/binops.js
@@ -0,0 +1,33 @@
+var binaryOperators = {
+ '!=': function(a, b) {
+ return a != b;
+ },
+
+ '<': function(a, b) {
+ return a < b;
+ },
+
+ '>': function(a, b) {
+ return a > b;
+ },
+
+ '-': function(a, b) {
+ return a - b;
+ },
+
+ '+': function(a, b) {
+ return a + b;
+ },
+
+ '==': function(a, b) {
+ return a == b;
+ },
+
+ '<=': function(a, b) {
+ return a <= b;
+ },
+
+ '>=': function(a, b) {
+ return a >= b;
+ }
+};