Skip to content

Instantly share code, notes, and snippets.

@goatslacker
Created March 5, 2015 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goatslacker/f57be231fe939756bff4 to your computer and use it in GitHub Desktop.
Save goatslacker/f57be231fe939756bff4 to your computer and use it in GitHub Desktop.
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
@HavokGamez
Copy link

can i have a alt
?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment