MCPcopy
hub / github.com/Linen-dev/linen.dev / topline

Function topline

packages/ast/parse/combinators.js:21–27  ·  view source on GitHub ↗
(matcher)

Source from the content-addressed store, hash-verified

19};
20
21const topline = (matcher) => (text, position) => {
22 if (position > 0 && text.charAt(position - 1) !== '\n') {
23 return null;
24 }
25
26 return matcher(text, position);
27};
28
29const deep = (type, callback) => (match, _, position) => {
30 const [result, content] = match;

Callers 2

index.jsFile · 0.85
index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected