function $$emit(elem, name, detail, noCancel=true) {
  let event;
  if (!elem || !name) return warn('You did not provide an element or event name.');
  event = new CustomEvent(name, {
    bubbles: true,
    cancelable: !noCancel,
    detail: detail
  });
  return elem.dispatchEvent(event);
}
/**
 * Emit a custom event
 * @param  {Node} elem The element to emit the custom event on
 * @param  {String}  name The name of the custom event
 * @param  {*} detail Details to attach to the event
 * @param  {Boolean} noCancel If false, event cannot be cancelled
**/
Emit a custom event
@param  {Node} elem The element to emit the custom event on
@param  {String}  name The name of the custom event
@param  {*} detail Details to attach to the event
@param  {Boolean} noCancel If false, event cannot be cancelled
Emit a custom event @param { Node } elem The element to emit the custom event on @param { String } name The name of the custom event @param { * } detail Details to attach to the event @param { Boolean } noCancel If false event cannot be cancelled
function $$emit(elem, name, detail, noCancel=true) {
  let event;
  if (!elem || !name) return warn('You did not provide an element or event name.');
  event = new CustomEvent(name, {
    bubbles: true,
    cancelable: !noCancel,
    detail: detail
  });
  return elem.dispatchEvent(event);
}
function $$emit ( elem , name , detail , noCancel = true ) { let event ; if ( ! elem || ! name ) return warn ( 'You did not provide an element or event name.' ) ; event = new CustomEvent ( name , { bubbles : true , cancelable : ! noCancel , detail : detail } ) ; return elem . dispatchEvent ( event ) ; }
Emit a custom event
 @param  {Node} elem The element to emit the custom event on
 @param  {String}  name The name of the custom event
 @param  {*} detail Details to attach to the event
 @param  {Boolean} noCancel If false, event cannot be cancelled
Emit a custom event @param { Node } elem The element to emit the custom event on @param { String } name The name of the custom event @param { * } detail Details to attach to the event @param { Boolean } noCancel If false event cannot be cancelled