What's the meaning of 'trim' when use in mongoose?

Viewed 43454
3 Answers

Using trim will help in removing the white spaces present (beginning and ending of the string) in the string that you want to save to the DB like

"ABC " , "     ABC  ",

will be saved in the form

"ABC"

trim in mongoose use to remove the white spaces from the strings

Related