Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // some-dooms-day-feature.js
  2. (function (module) {
  3.     module.exports = function ($, module) {
  4.         var dooooom = {};
  5.        
  6.         $.onInit(module, function () {
  7.             $.registerGlobal('dooooom', function () {
  8.                 return dooooom;
  9.             });
  10.         });
  11.        
  12.         /**
  13.          * Makes dooooom happen!!!!
  14.          * @param void
  15.          * @return void
  16.          */
  17.         dooooom.makeHappen = function () {
  18.             console.log('dooooom!!!!');
  19.         };
  20.        
  21.         return dooooom();
  22.     };
  23. }((typeof window === 'undefined') ? module : window.thorny_path('./thorny/common/some-dooms-day-feature')));
  24.  
  25.  
  26. // app.js
  27. require('./thorny/base')('./config/default.json', function ($) {
  28.     if ($.dooooom().makeHappen() === $('thorny some-dooms-day-feature').makeHappen()) {
  29.         // serve cake, because cake and dooooom is an ideal pairing.
  30.     }
  31. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement