Fine tuning on the editor and the boardgame.

namespaces
Frode Petterson 2013-04-30 17:07:14 +02:00
parent 9c0fb69e27
commit 5156cbd479
1 changed files with 10 additions and 0 deletions

View File

@ -190,6 +190,16 @@ H5P.cloneObject = function (object, recursive, array) {
return clone; return clone;
}; };
/**
* Remove all empty spaces before and after the value.
*
* @param {String} value
* @returns {@exp;value@call;replace}
*/
H5P.trim = function (value) {
return value.replace(/^\s+|\s+$/g, '');
};
// We have several situations where we want to shuffle an array, extend array // We have several situations where we want to shuffle an array, extend array
// to do so. // to do so.
Array.prototype.shuffle = function() { Array.prototype.shuffle = function() {