These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
| // No imports, those are more work, especially for plain browser. | |
| // However, as soon as you have imports, you should switch to AMD on browsers. | |
| // Related: http://www.2ality.com/2011/11/module-gap.html | |
| ({ define: | |
| typeof define === "function" ? | |
| define | |
| : typeof module !== "undefined" ? | |
| function(F) { module.exports = F() } | |
| : function(F) { this.defClass = F() }.bind(this) |
These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
| /* | |
| * Simple Pub/Sub Implementation for jQuery | |
| * | |
| * Inspired by work from Peter Higgins (https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js) | |
| * | |
| * This is about the simplest way to write a pubsub JavaScript implementation for use with jQuery. | |
| */ | |
| (function( $ ) { | |
| // Cache of all topics |
This is now an actual repo:
| // 1: how could you rewrite the following to make it shorter? | |
| if (foo) { | |
| bar.doSomething(el); | |
| } else { | |
| bar.doSomethingElse(el); | |
| } | |