Programming Tips - javaScript: convert a Blob to a File

Date: 2016may10 Language: javaScript Platform: web Q. javaScript: convert a Blob to a File A. The File constructor accepts a Blob but not in all browsers so this seems like the best way:
function blobToFile(myblob, name) { let file = null; try { file = new File([myblob], name); } catch(error) { file = myblob; file.lastModifiedDate = new Date(); file.name = name; } return file; }