index.js
function loadPathsRec(thisPath) {
		const	subLogPrefix	= logPrefix + 'loadPathsRec() - ';

		let	thisPaths;

		if (that.paths.indexOf(thisPath) === - 1) {
			that.log.debug(subLogPrefix + 'Adding ' + path.basename(thisPath) + ' to paths with full path ' + thisPath);
			that.paths.push(thisPath);
		}

		thisPaths	= that.fs.readdirSync(thisPath + '/node_modules');

		for (let i = 0; thisPaths[i] !==  undefined; i ++) {
			try {
				const	subStat	= that.fs.statSync(thisPath + '/node_modules/' + thisPaths[i]);

				if (subStat.isDirectory()) {
					loadPathsRec(thisPath + '/node_modules/' + thisPaths[i]);
				}
			} catch (err) {
				that.log.silly(subLogPrefix + 'Could not read "' + thisPaths[i] + '": ' + err.message);
			}
		}
	}
function loadPathsRec(thisPath) {
		const	subLogPrefix	= logPrefix + 'loadPathsRec() - ';

		let	thisPaths;

		if (that.paths.indexOf(thisPath) === - 1) {
			that.log.debug(subLogPrefix + 'Adding ' + path.basename(thisPath) + ' to paths with full path ' + thisPath);
			that.paths.push(thisPath);
		}

		thisPaths	= that.fs.readdirSync(thisPath + '/node_modules');

		for (let i = 0; thisPaths[i] !==  undefined; i ++) {
			try {
				const	subStat	= that.fs.statSync(thisPath + '/node_modules/' + thisPaths[i]);

				if (subStat.isDirectory()) {
					loadPathsRec(thisPath + '/node_modules/' + thisPaths[i]);
				}
			} catch (err) {
				that.log.silly(subLogPrefix + 'Could not read "' + thisPaths[i] + '": ' + err.message);
			}
		}
	}
function loadPathsRec ( thisPath ) { const subLogPrefix = logPrefix + 'loadPathsRec() - ' ; let thisPaths ; if ( that . paths . indexOf ( thisPath ) === - 1 ) { that . log . debug ( subLogPrefix + 'Adding ' + path . basename ( thisPath ) + ' to paths with full path ' + thisPath ) ; that . paths . push ( thisPath ) ; } thisPaths = that . fs . readdirSync ( thisPath + '/node_modules' ) ; for ( let i = 0 ; thisPaths [ i ] !== undefined ; i ++ ) { try { const subStat = that . fs . statSync ( thisPath + '/node_modules/' + thisPaths [ i ] ) ; if ( subStat . isDirectory ( ) ) { loadPathsRec ( thisPath + '/node_modules/' + thisPaths [ i ] ) ; } } catch ( err ) { that . log . silly ( subLogPrefix + 'Could not read "' + thisPaths [ i ] + '": ' + err . message ) ; } } }
Add all other paths, recursively

@param {str} thisPath - the path to search for
Add all other paths recursively