.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / pkg-dir / index.js
1 'use strict';
2 const path = require('path');
3 const findUp = require('find-up');
4
5 module.exports = cwd => findUp('package.json', {cwd}).then(fp => fp ? path.dirname(fp) : null);
6
7 module.exports.sync = cwd => {
8         const fp = findUp.sync('package.json', {cwd});
9         return fp ? path.dirname(fp) : null;
10 };