import $ from 'jquery'; import domready from 'domready'; import is from 'is'; class Alert{ constructor(alertsContainer) { if(!Alert.instance){ Alert.instance = this; }else{ return Alert.instance; } this.container = alertsContainer; return Alert.instance; } pushNewAlert(type,msg){ let html = Alert.toAlertString(type,msg); $(this.container).append(html); } static toAlertString(type,msg){ return `