Created
July 1, 2011 09:06
-
-
Save iaincarsberg/1058136 to your computer and use it in GitHub Desktop.
Thorny: De-verbos-ing the api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('./thorny/base')('./config/default.json', function ($) { | |
if ($.dooooom().makeHappen() === $('thorny some-dooms-day-feature').makeHappen()) { | |
// serve cake, because cake and dooooom is an ideal pairing. | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global window*/ | |
(function (module) { | |
module.exports = function ($, module) { | |
var dooooom = {}; | |
$.onInit(module, function () { | |
$.registerGlobal('dooooom', function () { | |
return dooooom; | |
}); | |
}); | |
/** | |
* Makes dooooom happen!!!! | |
* @param void | |
* @return void | |
*/ | |
dooooom.makeHappen = function () { | |
console.log('dooooom!!!!'); | |
}; | |
return dooooom; | |
}; | |
}((typeof window === 'undefined') ? module : window.thorny_path('./thorny/common/some-dooms-day-feature'))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment