(func, wait, totalWait)
| 730 | |
| 731 | // Call done with true to satisfy the 'until' goal and stop repeating func |
| 732 | const keepDoingUntil = function (func, wait, totalWait) { |
| 733 | let done |
| 734 | if (wait == null) { wait = 100 } |
| 735 | if (totalWait == null) { totalWait = 5000 } |
| 736 | let waitSoFar = 0 |
| 737 | return (done = function (success) { |
| 738 | if (((waitSoFar += wait) <= totalWait) && !success) { |
| 739 | return _.delay(() => func(done), wait) |
| 740 | } |
| 741 | })(false) |
| 742 | } |
| 743 | |
| 744 | const grayscale = function (imageData) { |
| 745 | const d = imageData.data |
nothing calls this directly
no outgoing calls
no test coverage detected