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

Method trim

src/MagicString.ts:1080–1082  ·  view source on GitHub ↗

* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.

(charType?: string)

Source from the content-addressed store, hash-verified

1078 * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
1079 */
1080 trim(charType?: string): this {
1081 return this.trimStart(charType).trimEnd(charType)
1082 }
1083
1084 /** @internal */
1085 trimEndAborted(charType?: string): boolean {

Callers 2

trimLinesMethod · 0.95
isEmptyMethod · 0.45

Calls 2

trimStartMethod · 0.95
trimEndMethod · 0.45

Tested by

no test coverage detected