(maxDepth)
| 5 | const FILENAME = '.stdlib'; |
| 6 | |
| 7 | function findPath (maxDepth) { |
| 8 | |
| 9 | maxDepth = parseInt(maxDepth) || 0; |
| 10 | |
| 11 | let cwd = process.cwd(); |
| 12 | let directories = cwd.split(path.sep); |
| 13 | let stdlibPath = ''; |
| 14 | |
| 15 | for (let i = directories.length; i > 0; i--) { |
| 16 | let relpath = path.join(directories.slice(0, i).join(path.sep), FILENAME); |
| 17 | if (fs.existsSync(relpath)) { |
| 18 | stdlibPath = relpath; |
| 19 | break; |
| 20 | } |
| 21 | if (!(--maxDepth)) { |
| 22 | break; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | return stdlibPath; |
| 27 | |
| 28 | } |
| 29 | |
| 30 | function readCredentials() { |
| 31 |
no outgoing calls
no test coverage detected