function _hasPackageJsonTypeModule()

in src/UserFunction.js [125:131]


function _hasPackageJsonTypeModule(file) {
  // File must have a .js extension
  const jsPath = file + '.js';
  return fs.existsSync(jsPath)
    ? _hasFolderPackageJsonTypeModule(path.resolve(path.dirname(jsPath)))
    : false;
}