Created
March 5, 2015 05:09
-
-
Save goatslacker/f57be231fe939756bff4 to your computer and use it in GitHub Desktop.
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
var Alt = require('alt') | |
var alt = new Alt() | |
function Actions() { | |
} | |
Actions.prototype.fetchCat = function* () { | |
yield 1; | |
yield 2; | |
yield 3; | |
} | |
var actions = alt.createActions(Actions) | |
var action = actions.fetchCat() | |
console.log(action.next()) // 1 | |
console.log(action.next()) // 2 | |
console.log(action.next()) // 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can i have a alt
?