(library, fakes)
| 3498 | var forEach = Array.prototype.forEach; |
| 3499 | |
| 3500 | function usePromiseLibrary(library, fakes) { |
| 3501 | if (typeof library === "undefined") { |
| 3502 | return; |
| 3503 | } |
| 3504 | |
| 3505 | if (Array.isArray(fakes)) { |
| 3506 | forEach.call(fakes, usePromiseLibrary.bind(null, library)); |
| 3507 | |
| 3508 | return; |
| 3509 | } |
| 3510 | |
| 3511 | if (typeof fakes.usingPromise === "function") { |
| 3512 | fakes.usingPromise(library); |
| 3513 | } |
| 3514 | } |
| 3515 | |
| 3516 | module.exports = usePromiseLibrary; |
| 3517 |