Skip to content

Latest commit

 

History

History

trim

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

trim方法实现

String.prototype.trim = function () {
  return this.replace(/^\s+|\s+$/g, '')
}

参考