CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
index.js19 linesDownload Raw Back to sync
1const { dirname, resolve } = require('path');2const { readdirSync, statSync } = require('fs');3 4module.exports = function (start, callback) {5	let dir = resolve('.', start);6	let tmp, stats = statSync(dir);7 8	if (!stats.isDirectory()) {9		dir = dirname(dir);10	}11 12	while (true) {13		tmp = callback(dir, readdirSync(dir));14		if (tmp) return resolve(dir, tmp);15		dir = dirname(tmp = dir);16		if (tmp === dir) break;17	}18}19 
basant307/AI_Governance_Project · CoolFace