Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement