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

Method trim

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

1022 * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
1023 */
1024 trim(charType?: string): this {
1025 return this.trimStart(charType).trimEnd(charType)
1026 }
1027
1028 /** @internal */
1029 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