Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rich-Harris/magic-string
/ trim
Method
trim
src/Bundle.js:258–260 ·
view source on GitHub ↗
(charType)
Source
from the content-addressed store, hash-verified
256
}
257
258
trim(charType) {
259
return
this.trimStart(charType).trimEnd(charType);
260
}
261
262
trimStart(charType) {
263
const
rx =
new
RegExp(
'^'
+ (charType ||
'\\s'
) +
'+'
);
Callers
4
trimLines
Method · 0.95
Bundle.test.js
File · 0.45
MagicString.test.js
File · 0.45
isEmpty
Method · 0.45
Calls
2
trimStart
Method · 0.95
trimEnd
Method · 0.45
Tested by
no test coverage detected