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

Method trim

benchmark/data.js:733–735  ·  view source on GitHub ↗
(charType)

Source from the content-addressed store, hash-verified

731 return this.trim('[\\r\\n]');
732 }
733 trim(charType) {
734 return this.trimStart(charType).trimEnd(charType);
735 }
736 trimEndAborted(charType) {
737 const rx = new RegExp((charType || '\\s') + '+$');
738 this.outro = this.outro.replace(rx, '');

Callers 1

trimLinesMethod · 0.95

Calls 2

trimStartMethod · 0.95
trimEndMethod · 0.45

Tested by

no test coverage detected