function readFile(file) {
	var dfd = $.Deferred();
	var reader = new FileReader();

	reader.onload = e => dfd.resolve(e.target.result);

	reader.onerror = err => dfd.reject(err);

	reader.readAsText(file);

	return dfd.promise();
}
/**
 * Promisify the file reader
 * @param  {File} file The file to read
 * @return {Promise}      A promise that resolves when the file is read
 */
Promisify the file reader
@param  {File} file The file to read
@return {Promise}      A promise that resolves when the file is read
Promisify the file reader @param { File } file The file to read @return { Promise } A promise that resolves when the file is read
function readFile(file) {
	var dfd = $.Deferred();
	var reader = new FileReader();
	reader.onload = e => dfd.resolve(e.target.result);
	reader.onerror = err => dfd.reject(err);
	reader.readAsText(file);
	return dfd.promise();
}
function readFile ( file ) { var dfd = $ . Deferred ( ) ; var reader = new FileReader ( ) ; reader . onload = e => dfd . resolve ( e . target . result ) ; reader . onerror = err => dfd . reject ( err ) ; reader . readAsText ( file ) ; return dfd . promise ( ) ; }
Promisify the file reader
 @param  {File} file The file to read
 @return {Promise}      A promise that resolves when the file is read
Promisify the file reader @param { File } file The file to read @return { Promise } A promise that resolves when the file is read