Server : LiteSpeed
System : Linux server64.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : nimalaab ( 3358)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/alt/alt-nodejs22/root/usr/lib/node_modules/npm/node_modules/@npmcli/git/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/alt/alt-nodejs22/root/usr/lib/node_modules/npm/node_modules/@npmcli/git/lib/find.js
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
  }
}

F1le Man4ger