UNPKG

e-lado

Version:

[![CircleCI](https://circleci.com/gh/sharetribe/sharetribe/tree/master.svg?style=svg)](https://circleci.com/gh/sharetribe/sharetribe/tree/master) [![Dependency Status](https://gemnasium.com/sharetribe/sharetribe.png)](https://gemnasium.com/sharetribe/shar

24 lines (18 loc) 436 B
"use strict"; var path = require("path"); var exists = require("./utils/exists")({}); var read = require("./utils/read")({}); var find = function find(start, rel) { var file = path.join(start, rel); if (exists(file)) { return read(file); } var up = path.dirname(start); if (up !== start) { return find(up, rel); } }; module.exports = function (loc, rel) { rel = rel || ".babelrc"; return find(loc, rel); };