Xwam = function(inputs){ const self = this; let started = false; const construct = () => {}; this.start = callback => { const end = status => typeof callback == "function" && callback(status); if(started){ end(false); return false; }; started = true; end(true); return true; }; construct(); };