MCPcopy Create free account
hub / github.com/Effect-TS/effect / stripComment

Method stripComment

packages/effect/src/encoding/Yaml.ts:874–879  ·  view source on GitHub ↗
(text: string, plain: boolean)

Source from the content-addressed store, hash-verified

872
873 // Scan comments with the parser's collection and token context, preserving quoted hashes.
874 private stripComment(text: string, plain: boolean): string {
875 const index = findIndicator(text, "#", this.depth, undefined, !plain, !plain && this.afterJsonNode)
876 if (index === -1) return text
877 this.comment = true
878 return trimWhiteEnd(text.slice(0, index))
879 }
880
881 private skipWhitespace(): void {
882 while (true) {

Callers 2

readQuotedMethod · 0.95
nextChunkMethod · 0.95

Calls 3

findIndicatorFunction · 0.85
trimWhiteEndFunction · 0.85
sliceMethod · 0.80

Tested by

no test coverage detected