Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Rich-Harris/magic-string
/ trim
Method
trim
src/Bundle.ts:320–322 ·
view source on GitHub ↗
(charType?: string)
Source
from the content-addressed store, hash-verified
318
}
319
320
trim(charType?: string): this {
321
return
this.trimStart(charType).trimEnd(charType)
322
}
323
324
trimStart(charType?: string): this {
325
const
rx =
new
RegExp(`^${charType ||
'\\s'
}+`)
Callers
4
trimLines
Method · 0.95
Bundle.test.ts
File · 0.45
MagicString.test.ts
File · 0.45
isEmpty
Method · 0.45
Calls
2
trimStart
Method · 0.95
trimEnd
Method · 0.45
Tested by
no test coverage detected