Every line of 'promise notify' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
22 notify() { 23 if (this.state === ThePromise.states.fulfilled) { 24 if (this.onFulfilledFns.length) { 25 const onFulfilled = this.onFulfilledFns.shift(); 26 onFulfilled(this.value); 27 this.notify(); 28 } 29 } else if (this.state === ThePromise.states.rejected) { 30 if (this.onRejectedFns.length) { 31 const onRejected = this.onRejectedFns.shift(); 32 onRejected(this.value); 33 this.notify(); 34 } 35 } 36 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
193 .then ( function notifyComplete () { self.notify ("collectionLoaded"); return; } )
117 function notify(title, text, type, time) { 118 $.pnotify({ 119 title: title, 120 text: text, 121 type: type, 122 history: false, 123 sticker: false, 124 closer_hover: false, 125 addclass: "stack-bottomright", 126 stack: {"dir1": "up", "dir2": "left", push: 'top'} 127 }) 128 }
56 function PromiseSource(notify, stop, promise) { 57 this.stop = stop; 58 59 promise 60 .then((object) => { 61 this.value = object; 62 notify(); 63 }) 64 .catch(stop); 65 }