MCPcopy
hub / github.com/date-fns/date-fns / run

Function run

pkgs/core/src/parse/_lib/Parser.ts:10–31  ·  view source on GitHub ↗
(
    dateString: string,
    token: string,
    match: Match,
    options: ParserOptions,
  )

Source from the content-addressed store, hash-verified

8 public subPriority?: number;
9
10 public run(
11 dateString: string,
12 token: string,
13 match: Match,
14 options: ParserOptions,
15 ): { setter: ValueSetter<Value>; rest: string } | null {
16 const result = this.parse(dateString, token, match, options);
17 if (!result) {
18 return null;
19 }
20
21 return {
22 setter: new ValueSetter<Value>(
23 result.value,
24 this.validate,
25 this.set,
26 this.priority,
27 this.subPriority,
28 ),
29 rest: result.rest,
30 };
31 }
32
33 protected abstract parse(
34 dateString: string,

Callers 1

testScriptFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected