Code to improve error message display (prevent repeats, log to console dev errors instead of alert box)

This commit is contained in:
2019-11-13 23:09:34 +00:00
parent 1d3d00c6f5
commit 7148291c20
2 changed files with 28 additions and 2 deletions

View File

@@ -94,6 +94,23 @@ export default {
// //No longer than 255 characters
// inObj = StringUtil.MaxLength(inObj, 255);
// return inObj;
},
///////////////////////////////
// Quick hash for trivial purposes
// not cryptographic
// https://stackoverflow.com/a/7616484/8939
//
quickHash: function(theString) {
var hash = 0,
i,
chr;
if (theString.length === 0) return hash;
for (i = 0; i < theString.length; i++) {
chr = theString.charCodeAt(i);
hash = (hash << 5) - hash + chr;
hash |= 0; // Convert to 32bit integer
}
return hash;
}
//new functions above here