Created
October 26, 2015 01:22
-
-
Save brunops/2aa55c262e369d3037be to your computer and use it in GitHub Desktop.
mapping classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map = require('./map'); | |
new map['Test'](); | |
// "hello from Test contructor" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
Test: require('./class-test') | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test { | |
constructor() { | |
console.log('hello from Test constructor'); | |
} | |
} | |
module.exports = Test; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment