lib/credit.js
function addCreditToCredits(credits, person, name) {
	let credit = getCredit(credits, person);

	if (!credit) {
		credit = person;
		credit.packages = [];

		credits.push(credit);
	}

	if (credit.packages.indexOf(name) === -1) {
		credit.packages.push(name);
	}

	return credits;
}
function addCreditToCredits(credits, person, name) {
	let credit = getCredit(credits, person);

	if (!credit) {
		credit = person;
		credit.packages = [];

		credits.push(credit);
	}

	if (credit.packages.indexOf(name) === -1) {
		credit.packages.push(name);
	}

	return credits;
}
function addCreditToCredits ( credits , person , name ) { let credit = getCredit ( credits , person ) ; if ( ! credit ) { credit = person ; credit . packages = [ ] ; credits . push ( credit ) ; } if ( credit . packages . indexOf ( name ) === - 1 ) { credit . packages . push ( name ) ; } return credits ; }
Add a credit to running credits list

@param {Array} credits  list of credits
@param {Object} person  person to give credit
@param {String} name    project name to attach to person

@return {Array}         list of credits

@tested
Add a credit to running credits list