File "find.js"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/usr/lib/node_modules/npm/node_modules/@npmcli/git/lib/find.js
File size: 316 bytes
MIME-type: text/plain
Charset: utf-8

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
  }
}