Skip to content

Instantly share code, notes, and snippets.

@zootella
Created March 5, 2013 22:15
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 zootella/5094826 to your computer and use it in GitHub Desktop.
Save zootella/5094826 to your computer and use it in GitHub Desktop.
var newFile = function() {
var state = newState();
function close() {//maybe state.close = function() instead
if (state.already()) { log('already closed'); return; }
};
state.pulse = function() {
log('pulse!');
}
return {
state:state,
close:close//then you don't need to export close
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment