{"size": 436, "ext": "js", "max_stars_repo_path": "src/utils/data-importer/handle-all-target-files.js", "max_stars_repo_name": "dennisdevetter/atp-rest", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/utils/data-importer/handle-all-target-files.js", "max_issues_repo_name": "dennisdevetter/atp-rest", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/utils/data-importer/handle-all-target-files.js", "max_forks_repo_name": "dennisdevetter/atp-rest", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.1428571429, "max_line_length": 74, "alphanum_fraction": 0.7385321101}
import handleTargetFile from './handle-target-file'
import { validateRequiredArgument } from '../../utils/argument-validation'

export default function handleAllTargetFiles(targetFiles){
	validateRequiredArgument({targetFiles})
	
	return (taskInfo) => {
		var lastPromise = targetFiles.reduce((promise, target) => {					
			return promise.then(() => handleTargetFile(target, taskInfo))
		}, Promise.resolve())

		return lastPromise
	}
}