Created
August 17, 2016 14:49
-
-
Save nesbtesh/22e46dedfbbd7a34e49427e776435b06 to your computer and use it in GitHub Desktop.
Generators ES6
This file contains hidden or 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
function* getStockValue() { | |
var entry1 = yield request('http://myrl.com/stock/key'); | |
var data1 = JSON.parse(entry1); | |
var entry2 = yield request('http://myurl/stock/value'); | |
var data2 = JSON.parse(entry2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment