Skip to content

Instantly share code, notes, and snippets.

@meeDamian
Created April 7, 2014 13:55
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 meeDamian/10020748 to your computer and use it in GitHub Desktop.
Save meeDamian/10020748 to your computer and use it in GitHub Desktop.
Cryptsy = ->
if Cryptsy::_singletonInstance
return Cryptsy::_singletonInstance
Cryptsy::_singletonInstance = @
@orders = []
function Cryptsy() {
// solution from: goo.gl/MKJa4b
if( Cryptsy.prototype._singletonInstance )
return Cryptsy.prototype._singletonInstance;
Cryptsy.prototype._singletonInstance = this;
// init values
this.orders = [];
// some other code
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment