Helper function to make firing Toast messages easy in lightning components.
({
// utility to pop up a toast msg easily
// type is 'error', 'warning', 'success', or 'info'
toast: function (type, title, msg) {
let t = $A.get('e.force:showToast')