UNPKG

react-router-ga

Version:

[![Downloads](https://img.shields.io/npm/dm/react-router-ga)](https://npm.im/react-router-ga) [![Version](https://img.shields.io/npm/v/react-router-ga)](https://npm.im/react-router-ga) [![License](https://img.shields.io/npm/l/react-router-ga)](https://ope

11 lines (8 loc) 297 B
'use strict'; const path = require('path'); const findUp = require('find-up'); module.exports = cwd => findUp('package.json', {cwd}).then(fp => fp ? path.dirname(fp) : null); module.exports.sync = cwd => { const fp = findUp.sync('package.json', {cwd}); return fp ? path.dirname(fp) : null; };