added ASSERT, fixed #103

This commit is contained in:
Jeena 2015-03-15 16:51:38 +01:00
parent 55eff36f34
commit dfa71bc8e5
17 changed files with 249 additions and 153 deletions

View file

@ -0,0 +1,21 @@
define([
"Lib/Utilities/Exception"
],
function (Exception) {
"use strict";
var Assert = {};
Assert.number = function() {
for (var i = 0; i < arguments.length; i++) {
if(isNaN(parseFloat(arguments[i]))) {
throw new Exception("Assert: not a number ", JSON.stringify(arguments));
}
}
};
return Assert;
});