This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Trim Object | |
* Trims all strings in all levels | |
* @param {Object} dirty | |
* @returns {Object} clean | |
*/ | |
function trimObject(object){ | |
if(typeof object === 'string'){ | |
object = object.trim().replace(/\t/g,'').replace(/\n/g,''); | |
}else if(object instanceof Array){ |