Lines Matching refs:then
36 var then = value.then;
37 if (typeof then === 'function') {
38 return new Promise(then.bind(value));
57 if (val instanceof Promise && val.then === Promise.prototype.then) {
63 val.then(function (val) {
68 var then = val.then;
69 if (typeof then === 'function') {
70 var p = new Promise(then.bind(val));
71 p.then(function (val) {
98 Promise.resolve(value).then(resolve, reject);
106 return this.then(null, onRejected);