Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ({modules:[function(require,module,exports){
- //
- // Module 0: ../program.js
- //
- var test = require(1);
- var a = require(3);
- var b = require(4);
- test.assert(a.a, 'a exists');
- test.assert(b.b, 'b exists')
- test.assert(a.a().b === b.b, 'a gets b');
- test.assert(b.b().a === a.a, 'b gets a');
- test.print('DONE', 'info');
- //
- // EOF
- //
- },function(require,module,exports){
- //
- // Module 1: ../test.js
- //
- exports.print = typeof print !== "undefined" ? print : function () {
- var system = require(2);
- var stdio = system.stdio;
- stdio.print.apply(stdio, arguments);
- };
- exports.assert = function (guard, message) {
- if (guard) {
- exports.print('PASS ' + message, 'pass');
- } else {
- exports.print('FAIL ' + message, 'fail');
- }
- };
- //
- // EOF
- //
- },
- //
- // Module 2: ../system.js (NOT FOUND)
- //
- 0,function(require,module,exports){
- //
- // Module 3: ../a.js
- //
- exports.a = function () {
- return b;
- };
- var b = require(4);
- //
- // EOF
- //
- },function(require,module,exports){
- //
- // Module 4: ../b.js
- //
- var a = require(3);
- exports.b = function () {
- return a;
- };
- //
- // EOF
- //
- }
- //
- // Bootstrap
- //
- ],init:function(){
- 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]; };
- require.main={id:0};
- return require(0);
- }}).init();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement