Use strict everywhere

This commit is contained in:
Borys Levytskyi
2015-04-04 19:27:52 +03:00
parent ba284789ba
commit f14425da75
20 changed files with 50 additions and 31 deletions

View File

@@ -1,4 +1,6 @@
app.compose(function() {
"use strict";
var should = app.get('should')
app.set('calc', {

View File

@@ -1,4 +1,6 @@
app.compose(function(){
app.compose(function() {
"use strict";
var twoOperandsRegex = /^(\d+)\s*(<<|>>|\||\&|\^)\s*(\d+)$/;
var numbersList = /^((\d*)+\s?)+$/;

View File

@@ -1,32 +1,27 @@
(function(should, app){
app.compose(function() {
"use strict";
app.compose(function() {
var should = app.get('should');
app.set("formatter", {
toBinaryString: function(num, totalLength) {
var should = app.get('should');
app.set("formatter", {
toBinaryString: function(num, totalLength) {
var binaryStr = num.toString(2),
formatted = [],
i;
var binaryStr = num.toString(2),
formatted = [],
i;
if(totalLength != null) {
should.bePositiveInteger(totalLength);
}
if(totalLength != null) {
should.bePositiveInteger(totalLength);
}
for(i = 0; i<binaryStr.length; i++) {
formatted.push(binaryStr[i]);
}
while(totalLength > formatted.length) {
formatted.unshift('0');
}
return formatted.join('');
}
});
})
})(window.should, window.app);
for(i = 0; i<binaryStr.length; i++) {
formatted.push(binaryStr[i]);
}
while(totalLength > formatted.length) {
formatted.unshift('0');
}
return formatted.join('');
}
});
})

View File

@@ -1,4 +1,5 @@
app.run(function() {
"use strict";
var dispatcher = app.get('dispatcher');

View File

@@ -1,4 +1,5 @@
app.compose(function() {
"use strict";
app.controller('expressionInputCtrl', function (){
var dispatcher = app.get('dispatcher');

View File

@@ -1,4 +1,6 @@
app.compose(function() {
"use strict";
app.set('dispatcher', function() {
var handlers = [];
var is = app.get('is');

View File

@@ -1,5 +1,6 @@
// Expression View
app.compose(function () {
"use strict";
var formatter = app.get('formatter');
var calc = app.get('calc');

View File

@@ -1,4 +1,5 @@
(function(app) {
"use strict";
function BitwiseOperation () {
}

View File

@@ -1,4 +1,5 @@
(function(app, core){
"use strict";
app.set('html', core.HtmlBuilder);
app.set('is', core.is);