MCPcopy
hub / github.com/Justineo/github-hovercard / trim

Function trim

src/hovercard.js:758–763  ·  view source on GitHub ↗
(str, isCollapse)

Source from the content-addressed store, hash-verified

756 }
757
758 function trim(str, isCollapse) {
759 if (!str) {
760 return ''
761 }
762 return str.replace(/^\s+|\s+$/g, isCollapse ? ' ' : '')
763 }
764
765 function markExtracted(elem, type, value) {
766 if (value) {

Callers 2

getNextTextNodeFunction · 0.70
extractElemFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected