Created
May 3, 2016 22:12
-
-
Save vojtatranta/d5b9759f226e96b25bbf97341bd2e74c to your computer and use it in GitHub Desktop.
Unhell promise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// unhell promise | |
ImageProcessor.prototype.execResizeImage = function ImageProcessor_execResizeImage(option, imageData) { | |
var resizer = new ImageResizer(option.size); | |
return resizer.exec(imageData) | |
.then(function(resizedImage) { | |
var reducer = new ImageReducer(option); | |
return reducer.exec(resizedImage) | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment