Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rich-Harris/magic-string
/ trim
Method
trim
benchmark/data-min.js:819–821 ·
view source on GitHub ↗
(t)
Source
from the content-addressed store, hash-verified
817
return
this.trim(
'[\\r\\n]'
);
818
}
819
trim(t) {
820
return
this.trimStart(t).trimEnd(t);
821
}
822
trimStart(t) {
823
const
e =
new
RegExp(
'^'
+ (t ||
'\\s'
) +
'+'
);
824
if
(((this.intro = this.intro.replace(e,
''
)), !this.intro)) {
Callers
1
trimLines
Method · 0.95
Calls
2
trimStart
Method · 0.95
trimEnd
Method · 0.45
Tested by
no test coverage detected