Skip to content

Instantly share code, notes, and snippets.

@iaincarsberg
Created October 4, 2011 10:50
Show Gist options
  • Save iaincarsberg/1261339 to your computer and use it in GitHub Desktop.
Save iaincarsberg/1261339 to your computer and use it in GitHub Desktop.
RequireJS - Compose.js together
/*global require*/
require(['whom'], function (Whom) {
var me = new Whom('Iain', 27);
});
/*global define*/
define(
[
'compose'
],
function (
Compose
) {
return Compose(
function (name, age) {
this.name = name;
this.age = age;
},
{
/**
* Used to expose the x coordinate
* @param void
* @return double Containing the x value
*/
whom: function () {
return [
this.name,
'is',
this.age,
'years of age.'
].join(' ');
}
}
);
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment