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

Method trim

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

Source from the content-addressed store, hash-verified

1023 return this.trim('[\\r\\n]');
1024 }
1025 trim(charType) {
1026 return this.trimStart(charType).trimEnd(charType);
1027 }
1028 trimStart(charType) {
1029 const rx = new RegExp('^' + (charType || '\\s') + '+');
1030 this.intro = this.intro.replace(rx, '');

Callers 3

trimLinesMethod · 0.95
isEmptyMethod · 0.45
isEmptyMethod · 0.45

Calls 2

trimStartMethod · 0.95
trimEndMethod · 0.45

Tested by

no test coverage detected