MCPcopy Index your code
hub / github.com/foambubble/foam / getString

Function getString

packages/foam-cli/src/support/args.ts:77–87  ·  view source on GitHub ↗
(
  parsedOrOptions: ParsedArgs | Map<string, string | boolean>,
  name: string
)

Source from the content-addressed store, hash-verified

75export function getString(parsed: ParsedArgs, name: string): string | undefined;
76export function getString(options: Map<string, string | boolean>, name: string): string | undefined;
77export function getString(
78 parsedOrOptions: ParsedArgs | Map<string, string | boolean>,
79 name: string
80): string | undefined {
81 const options =
82 parsedOrOptions instanceof Map
83 ? parsedOrOptions
84 : parsedOrOptions.options;
85 const v = options.get(name);
86 return typeof v === 'string' ? v : undefined;
87}
88
89/** Returns all values for a repeatable flag (e.g. --tag foo --tag bar). */
90export function getStrings(parsed: ParsedArgs, name: string): string[] {

Callers 12

runGrepCommandFunction · 0.90
runListCommandFunction · 0.90
runNoteCommandFunction · 0.90
runLinksCommandFunction · 0.90
runQueryCommandFunction · 0.90
runLintCommandFunction · 0.90
runSearchCommandFunction · 0.90
runTagCommandFunction · 0.90
runOutlineCommandFunction · 0.90
runDailyCommandFunction · 0.90
runRenameCommandFunction · 0.90
resolveWorkspaceDirFunction · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected