JavaScript: Util trimSpace