MCPcopy
hub / github.com/NUKnightLab/TimelineJS3 / trim

Function trim

src/js/core/Util.js:269–274  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

267 * an empty string.
268 */
269export function trim(str) {
270 if (str && typeof(str.replace) == 'function') {
271 return str.replace(/^\s+|\s+$/g, '');
272 }
273 return "";
274}
275
276export function maxDepth(ary) {
277 // given a sorted array of 2-tuples of numbers, count how many "deep" the items are.

Callers 12

getFormattedDateMethod · 0.90
_assignIDMethod · 0.90
_tidyFieldsMethod · 0.90
Util.test.jsFile · 0.90
parseTimeFunction · 0.90
TLDate.jsFile · 0.90
parseDateFunction · 0.90
getFormattedDateMethod · 0.90
isEmptyObjectFunction · 0.85
slugifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected