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

Method trim

src/Bundle.ts:492–494  ·  view source on GitHub ↗
(charType?: string)

Source from the content-addressed store, hash-verified

490 }
491
492 trim(charType?: string): this {
493 return this.trimStart(charType).trimEnd(charType)
494 }
495
496 trimStart(charType?: string): this {
497 const rx = new RegExp(`^${charType || '\\s'}+`)

Callers 6

trimLinesMethod · 0.95
isEmptyMethod · 0.45
misc.test.tsFile · 0.45
trim.test.tsFile · 0.45
trim.test.tsFile · 0.45

Calls 2

trimStartMethod · 0.95
trimEndMethod · 0.45

Tested by

no test coverage detected