Files
jasmine/src/core/util.js
Sheel Choksi 579fddc2d2 Remove unused formatException from util
The ExceptionFormatter is used instead of formatException from jasmine util
2013-06-08 21:46:16 -07:00

31 lines
667 B
JavaScript

getJasmineRequireObj().util = function() {
var util = {};
util.inherit = function(childClass, parentClass) {
var subclass = function() {
};
subclass.prototype = parentClass.prototype;
childClass.prototype = new subclass();
};
util.htmlEscape = function(str) {
if (!str) return str;
return str.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
};
util.argsToArray = function(args) {
var arrayOfArgs = [];
for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
return arrayOfArgs;
};
util.isUndefined = function(obj) {
return obj === void 0;
};
return util;
};