(condition, message)
| 5 | }; |
| 6 | |
| 7 | export const throwInvariant = (condition, message) => { |
| 8 | if (!condition) { |
| 9 | throw Error(message); |
| 10 | } |
| 11 | }; |
| 12 | |
| 13 | export const isPromiseLike = (obj) => { |
| 14 | return !!obj && typeof obj === 'object' && typeof obj.then === 'function'; |