/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/npm/node_modules/@npmcli/git/lib/find.js
15 строк
316 B
npm CLI robot
deps: upgrade npm to 9.7.1
08 июн 2023, 15:24
Не верифицирован
08 июн 2023, 15:24
8c8e7e9
Код
Авторство
О чём код?
const is = require('./is.js') const { dirname } = require('path') module.exports = async ({ cwd = process.cwd(), root } = {}) => { while (true) { if (await is({ cwd })) { return cwd } const next = dirname(cwd) if (cwd === root || cwd === next) { return null } cwd = next } }