lib/package.js
function getMaintainers(packageJson) {
	if (Array.isArray(packageJson.maintainers)) {
		packageJson.maintainers = packageJson.maintainers.map(maintainer => {
			if (typeof maintainer === 'string') {
				return getPersonObject(maintainer);
			}

			return getAllStar(maintainer);
		});
	}

	// Safety fix for people doing
	// -> "maintainers" : "Bob <some.email>"
	if (typeof packageJson.maintainers === 'string') {
		packageJson.maintainers = [getPersonObject(packageJson.maintainers)];
	}

	return packageJson.maintainers ?
		packageJson.maintainers :
		false;
}
function getMaintainers(packageJson) {
	if (Array.isArray(packageJson.maintainers)) {
		packageJson.maintainers = packageJson.maintainers.map(maintainer => {
			if (typeof maintainer === 'string') {
				return getPersonObject(maintainer);
			}

			return getAllStar(maintainer);
		});
	}

	// Safety fix for people doing
	// -> "maintainers" : "Bob <some.email>"
	if (typeof packageJson.maintainers === 'string') {
		packageJson.maintainers = [getPersonObject(packageJson.maintainers)];
	}

	return packageJson.maintainers ?
		packageJson.maintainers :
		false;
}
function getMaintainers ( packageJson ) { if ( Array . isArray ( packageJson . maintainers ) ) { packageJson . maintainers = packageJson . maintainers . map ( maintainer => { if ( typeof maintainer === 'string' ) { return getPersonObject ( maintainer ) ; } return getAllStar ( maintainer ) ; } ) ; } // Safety fix for people doing // -> "maintainers" : "Bob <some.email>" if ( typeof packageJson . maintainers === 'string' ) { packageJson . maintainers = [ getPersonObject ( packageJson . maintainers ) ] ; } return packageJson . maintainers ? packageJson . maintainers : false ; }
Extract maintainers from package.json content

@param  {Object} packageJson content of package.json

@return {Array}              maintainers if exists or false

@tested
Extract maintainers from package . json content