Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | util.promise: Switch from pcall to xpcall to get tracebacks on exceptions | Matthew Wild | 2018-10-26 | 1 | -1/+1 |
| | |||||
* | util.promise: Remove the non-standard ability to pass a promise to reject() | Matthew Wild | 2018-10-26 | 1 | -3/+1 |
| | |||||
* | util.promise: Fix missing parameters | Matthew Wild | 2018-10-25 | 1 | -2/+2 |
| | |||||
* | util.promise: Ensure chained promises always receive a value/rejection even ↵ | Matthew Wild | 2018-10-25 | 1 | -22/+23 |
| | | | | if an intermediate promise has no handlers | ||||
* | util.promise: Export is_promise() | Matthew Wild | 2018-10-25 | 1 | -0/+1 |
| | |||||
* | util.promise: Remove debug print and assert | Matthew Wild | 2018-10-25 | 1 | -1/+0 |
| | |||||
* | util.promise: Add promise.try() | Matthew Wild | 2018-10-18 | 1 | -0/+6 |
| | |||||
* | util.promise: Add a string representation | Kim Alvefur | 2018-10-18 | 1 | -0/+4 |
| | |||||
* | util.promise: Add promise:finally() | Matthew Wild | 2018-10-18 | 1 | -0/+6 |
| | |||||
* | util.promise: Some code relocation | Matthew Wild | 2018-10-18 | 1 | -23/+23 |
| | |||||
* | util.promise: Also support automatic resolution by returning a promise from ↵ | Matthew Wild | 2018-10-18 | 1 | -1/+3 |
| | | | | | | | an on_reject handler Originally unimplemented because it wasn't clear to me what the correct behaviour was, but the A+ spec is clear that both onFulfilled and onRejected may return a promise. | ||||
* | util.promise: Fix promise.reject() to return a rejected promise, and fix ↵ | Matthew Wild | 2018-10-18 | 1 | -1/+1 |
| | | | | buggy test for it | ||||
* | util.promise: ES6-like API for promises | Matthew Wild | 2018-10-10 | 1 | -0/+133 |