Skip to content

Instantly share code, notes, and snippets.

@huang47
Last active December 19, 2015 22:28
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 huang47/6027518 to your computer and use it in GitHub Desktop.
Save huang47/6027518 to your computer and use it in GitHub Desktop.
partial app
var factory = (function () {
'use strict';
return function (suffix, type, url) {
return function (options) {
var m = {
suffix: suffix,
type: type,
url: url,
custom: {}
}, o;
for (o in options) {
if (options.hasOwnProperty(o)) {
m.custom[o] = options[o];
}
}
return m;
};
};
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment