Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2012
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ({modules:[function(require,module,exports){
  2. //
  3. // Module 0: ../program.js
  4. //
  5. var test = require(1);
  6. var a = require(3);
  7. var b = require(4);
  8.  
  9. test.assert(a.a, 'a exists');
  10. test.assert(b.b, 'b exists')
  11. test.assert(a.a().b === b.b, 'a gets b');
  12. test.assert(b.b().a === a.a, 'b gets a');
  13.  
  14. test.print('DONE', 'info');
  15. //
  16. // EOF
  17. //
  18. },function(require,module,exports){
  19. //
  20. // Module 1: ../test.js
  21. //
  22.  
  23. exports.print = typeof print !== "undefined" ? print : function () {
  24.     var system = require(2);
  25.     var stdio = system.stdio;
  26.     stdio.print.apply(stdio, arguments);
  27. };
  28.  
  29. exports.assert = function (guard, message) {
  30.     if (guard) {
  31.         exports.print('PASS ' + message, 'pass');
  32.     } else {
  33.         exports.print('FAIL ' + message, 'fail');
  34.     }
  35. };
  36.  
  37. //
  38. // EOF
  39. //
  40. },
  41. //
  42. // Module 2: ../system.js (NOT FOUND)
  43. //
  44. 0,function(require,module,exports){
  45. //
  46. // Module 3: ../a.js
  47. //
  48. exports.a = function () {
  49.     return b;
  50. };
  51. var b = require(4);
  52. //
  53. // EOF
  54. //
  55. },function(require,module,exports){
  56. //
  57. // Module 4: ../b.js
  58. //
  59. var a = require(3);
  60. exports.b = function () {
  61.     return a;
  62. };
  63. //
  64. // EOF
  65. //
  66. }
  67. //
  68. // Bootstrap
  69. //
  70. ],init:function(){
  71. var boot=this, exports=[], require=function(id) { var fn=boot.modules[id]; return exports[id] || void fn(require, id ? {id:id} : require.main, exports[id]={}) || exports[id]; };
  72. require.main={id:0};
  73. return require(0);
  74. }}).init();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement