lib/analyzers/npm/index.js
function getNpmCredits(packagePath, credits) {
	const directoryPath = path.dirname(packagePath);
	const name = path.basename(path.dirname(packagePath));

	if (
		name[0] !== '.' && (
			fs.lstatSync(directoryPath).isDirectory() ||
			fs.lstatSync(directoryPath).isSymbolicLink()
		)
	) {
		const packageJson = packageUtil.readJSONSync(packagePath);

		const author = packageUtil.getAuthor(packageJson);
		const maintainers = packageUtil.getMaintainers(packageJson);

		if (author) {
			credits = creditUtil.addCreditToCredits(credits, author, name);
		}

		if (maintainers) {
			maintainers.forEach(maintainer => {
				credits = creditUtil.addCreditToCredits(credits, maintainer, name);
			});
		}
	}

	return credits;
}
function getNpmCredits(packagePath, credits) {
	const directoryPath = path.dirname(packagePath);
	const name = path.basename(path.dirname(packagePath));

	if (
		name[0] !== '.' && (
			fs.lstatSync(directoryPath).isDirectory() ||
			fs.lstatSync(directoryPath).isSymbolicLink()
		)
	) {
		const packageJson = packageUtil.readJSONSync(packagePath);

		const author = packageUtil.getAuthor(packageJson);
		const maintainers = packageUtil.getMaintainers(packageJson);

		if (author) {
			credits = creditUtil.addCreditToCredits(credits, author, name);
		}

		if (maintainers) {
			maintainers.forEach(maintainer => {
				credits = creditUtil.addCreditToCredits(credits, maintainer, name);
			});
		}
	}

	return credits;
}
function getNpmCredits ( packagePath , credits ) { const directoryPath = path . dirname ( packagePath ) ; const name = path . basename ( path . dirname ( packagePath ) ) ; if ( name [ 0 ] !== '.' && ( fs . lstatSync ( directoryPath ) . isDirectory ( ) || fs . lstatSync ( directoryPath ) . isSymbolicLink ( ) ) ) { const packageJson = packageUtil . readJSONSync ( packagePath ) ; const author = packageUtil . getAuthor ( packageJson ) ; const maintainers = packageUtil . getMaintainers ( packageJson ) ; if ( author ) { credits = creditUtil . addCreditToCredits ( credits , author , name ) ; } if ( maintainers ) { maintainers . forEach ( maintainer => { credits = creditUtil . addCreditToCredits ( credits , maintainer , name ) ; } ) ; } } return credits ; }
Read  and evaluate dependency credits for npm module

@param  {String} packagePath        absolute path to package.json file
@param  {Array}  credits            list of credits to append to
@return {Array}                     list of credits
Read and evaluate dependency credits for npm module