mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-23 05:02:48 +01:00
Extracted mode views and controllers into separate features.
This commit is contained in:
@@ -24,15 +24,14 @@
|
||||
var o1 = parseInt(matches[1], 10);
|
||||
var o2 = parseInt(matches[3], 10);
|
||||
|
||||
return {
|
||||
string: matches.input,
|
||||
operand1: o1,
|
||||
sign: matches[2],
|
||||
operand2: o2,
|
||||
calculate: function() {
|
||||
return eval(this.string);
|
||||
}
|
||||
}
|
||||
var m = new app.models.BitwiseOperation();
|
||||
m.operand1 = o1;
|
||||
m.operand2 = o2;
|
||||
m.sing = matches[2];
|
||||
m.string = matches.input;
|
||||
m.result = eval(matches.input);
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
function createListOfNumbersExpression(matches) {
|
||||
@@ -42,10 +41,7 @@
|
||||
numbers.push(parseInt(matches[i], 10));
|
||||
}
|
||||
|
||||
return {
|
||||
string:matches.input,
|
||||
operands: numbers
|
||||
}
|
||||
return app.models.BitwiseNumbers(numbers);
|
||||
}
|
||||
|
||||
})(window.app);
|
||||
Reference in New Issue
Block a user