Guest User

JS dump

a guest
May 28th, 2015
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. // A.js
  3. //
  4. var A = (function () {
  5.     function A(name) {
  6.         this.name = name;
  7.     }
  8.     return A;
  9. })();
  10. module.exports = A;
  11.  
  12. //
  13. // B.js
  14. //
  15. var __extends = this.__extends || function (d, b) {
  16.     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  17.     function __() { this.constructor = d; }
  18.     __.prototype = b.prototype;
  19.     d.prototype = new __();
  20. };
  21. var A = require('./A');
  22. var C = require('./C');
  23. var B = (function (_super) {
  24.     __extends(B, _super);
  25.     function B(value) {
  26.         _super.call(this, value);
  27.     }
  28.     B.factory = function () {
  29.         var a = new C();
  30.         return a;
  31.     };
  32.     return B;
  33. })(A);
  34. module.exports = B;
  35.  
  36. //
  37. // C.js
  38. //
  39. var __extends = this.__extends || function (d, b) {
  40.     for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  41.     function __() { this.constructor = d; }
  42.     __.prototype = b.prototype;
  43.     d.prototype = new __();
  44. };
  45. var B = require('./B');
  46. var C = (function (_super) {
  47.     __extends(C, _super);
  48.     function C() {
  49.         _super.call(this, "C");
  50.     }
  51.     return C;
  52. })(B);
  53. module.exports = C;
  54.  
  55. //
  56. // Test.js
  57. //
  58. var B = require('./B');
  59. var Test = (function () {
  60.     function Test() {
  61.     }
  62.     Test.test = function () {
  63.         return B.factory();
  64.     };
  65.     return Test;
  66. })();
  67. module.exports = Test;
  68.  
  69. //
  70. // app.js
  71. //
  72. var Test = require('./Test');
  73. Test.test();
Add Comment
Please, Sign In to add comment