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

Method trim

src/MagicString.ts:1072–1074  ·  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

1070 * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
1071 */
1072 trim(charType?: string): this {
1073 return this.trimStart(charType).trimEnd(charType)
1074 }
1075
1076 /** @internal */
1077 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