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

Function member

packages/effect/src/IgnoreFile.ts:524–535  ·  view source on GitHub ↗
(
    chunk: ReadonlyArray<string>,
    at: number
  )

Source from the content-addressed store, hash-verified

522const isGoMatchSyntax = (pattern: ReadonlyArray<string>): boolean => {
523 // an escaped class member followed by more of the chunk, or `undefined`
524 const member = (
525 chunk: ReadonlyArray<string>,
526 at: number
527 ): { readonly code: number; readonly end: number } | undefined => {
528 if (at >= chunk.length || chunk[at] === "-" || chunk[at] === "]") {
529 return undefined
530 }
531 if (chunk[at] === "\\" && ++at >= chunk.length) {
532 return undefined
533 }
534 return at + 1 < chunk.length ? { code: codePoint(chunk[at]), end: at + 1 } : undefined
535 }
536 // the rest of `name` after a match, `false` on a mismatch, `undefined` on bad syntax
537 const matchChunk = (chunk: ReadonlyArray<string>, name: ReadonlyArray<string>): number | false | undefined => {
538 let failed = false

Callers 2

matchChunkFunction · 0.70
parseDockerClassFunction · 0.70

Calls 2

codePointFunction · 0.85
escapeErrorFunction · 0.85

Tested by

no test coverage detected