added a trimValue support to get the trimmed value
updated qunit test