function getInputOrUndefined()

in github-projects/map-labels/index.ts [80:87]


function getInputOrUndefined<U = string>(name: string, parse?: (v: string) => U): U | undefined {
  const value = core.getInput(name);
  if (value.length > 0) {
    return parse ? (parse(value) as U) : (value as unknown as U);
  } else {
    return undefined;
  }
}