Move node dev deps forward, add .jshintrc to support latest grunt-contrib-jshint and Code Climate score

This commit is contained in:
Davis W. Frank
2013-10-25 12:23:57 -07:00
parent 797984f173
commit 9e149d1e0f
10 changed files with 69 additions and 59 deletions

View File

@@ -3,14 +3,16 @@ getJasmineRequireObj().util = function() {
var util = {};
util.inherit = function(childClass, parentClass) {
var subclass = function() {
var Subclass = function() {
};
subclass.prototype = parentClass.prototype;
childClass.prototype = new subclass();
Subclass.prototype = parentClass.prototype;
childClass.prototype = new Subclass();
};
util.htmlEscape = function(str) {
if (!str) return str;
if (!str) {
return str;
}
return str.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
@@ -18,7 +20,9 @@ getJasmineRequireObj().util = function() {
util.argsToArray = function(args) {
var arrayOfArgs = [];
for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
for (var i = 0; i < args.length; i++) {
arrayOfArgs.push(args[i]);
}
return arrayOfArgs;
};