Skip to content

Instantly share code, notes, and snippets.

View Marak's full-sized avatar

Marak

View GitHub Profile
var F = function () {};
F.name // ''
F.name = "foo";
F.name // ''
function F(){}
var blah = new F();
// Only instantiate once and append the calls in your loop
// Because XHR responses pop out of the stack, all of the
// requests will be linked and sent before the first can
// return.
// Also, when passing the settings object as a config,
// the callback is inside the object. The signatures for
// sexy methods are (url, callback) or (settings)
// Can configure globally for the Sexy instance
@Marak
Marak / api.js
Created March 4, 2010 04:43 — forked from tim-smart/api.js
exports.someMethod = function (arg1, arg2, callback) {
// Do this for safety's sake, people might accidentally send us an extra arg
arg1 = arguments[0];
arg2 = arguments[1];
callback = arguments[arguments.length - 1];
callback(null, 'win!');
};