function getFunctionModulePath()

in src/loader.ts [180:194]


function getFunctionModulePath(codeLocation: string): string | null {
  try {
    return require.resolve(codeLocation);
  } catch (ex) {
    // Ignore exception, this means the function was not found here.
  }

  try {
    return require.resolve(codeLocation + '/function.js');
  } catch (ex) {
    // Ignore exception, this means the function was not found here.
  }

  return null;
}