4 examples of 'promise notify' in JavaScript

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.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
22notify() {
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}
193.then ( function notifyComplete () { self.notify ("collectionLoaded"); return; } )
117function 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}
56function 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}

Related snippets