MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / match

Function match

packages/ast/parse/parse.js:24–35  ·  view source on GitHub ↗
(input, position, matchers)

Source from the content-addressed store, hash-verified

22// https://github.com/pocka/slack-message-parser/blob/master/LICENSE
23
24function match(input, position, matchers) {
25 const { length } = matchers;
26 for (let index = 0; index < length; index++) {
27 const match = matchers[index](input, position);
28
29 if (match) {
30 return match;
31 }
32 }
33
34 return null;
35}
36
37function parse(input, matchers) {
38 const children = [];

Callers 1

parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected