node/merger/mergeapp.js
// Function to keep track of when file loads are complete
Function to keep track of when file loads are complete
Function to keep track of when file loads are complete
function done ( ) {
	readfiles ++
	if ( readfiles == 2 ) {
		fs.writeFile ( 'peopleComplete.txt', everyone.sort(), function ( error ) {
			if ( error ) {
				console.log ( 'No noes' + error )
				throw error
			}
		})
	}
}
function done ( ) { readfiles ++ if ( readfiles == 2 ) { fs . writeFile ( 'peopleComplete.txt' , everyone . sort ( ) , function ( error ) { if ( error ) { console . log ( 'No noes' + error ) throw error } } ) } }
Function to keep track of when file loads are complete
Function to keep track of when file loads are complete