MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / trim

Method trim

src/MagicString.js:742–744  ·  view source on GitHub ↗
(charType)

Source from the content-addressed store, hash-verified

740 }
741
742 trim(charType) {
743 return this.trimStart(charType).trimEnd(charType);
744 }
745
746 trimEndAborted(charType) {
747 const rx = new RegExp((charType || '\\s') + '+$');

Callers 2

trimLinesMethod · 0.95
isEmptyMethod · 0.45

Calls 2

trimStartMethod · 0.95
trimEndMethod · 0.45

Tested by

no test coverage detected