
Untitled
By: a guest on
Nov 26th, 2012 | syntax:
JavaScript | size: 0.23 KB | hits: 44 | expires: Never
a.js
------
function A() { }
A.prototype.func = function() { console.log('Hello from A'); }
function test() {
new A().func();
}
test();
module.exports = new A();
b.js
----
var A = require('./a');
A.func();