MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / trim

Function trim

libs/leaflet/leaflet-src.js:136–138  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

134 // @function trim(str: String): String
135 // Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)
136 function trim(str) {
137 return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
138 }
139
140 // @function splitWords(str: String): String[]
141 // Trims and splits the string on whitespace and returns the array of parts.

Callers 2

splitWordsFunction · 0.70
removeClassFunction · 0.70

Calls 1

trimMethod · 0.80

Tested by

no test coverage detected