Last active
March 23, 2016 03:21
-
-
Save ahmadnassri/987af4cb6762f77b7089 to your computer and use it in GitHub Desktop.
require collision
This file contains 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 = { | |
type: 'animal' | |
} |
This file contains 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 animal = require('./animal') | |
animal.type = 'cat' | |
module.exports = animal |
This file contains 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 animal = require('./animal') | |
animal.type = 'dog' | |
module.exports = animal |
This file contains 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 dogs = require('./dogs') | |
var cats = require('./cats') | |
var animal = require('./animal') | |
console.log(dogs) | |
console.log(cats) | |
console.log(animal) | |
// => outputs | |
// $ node test.js | |
// { type: 'cat' } | |
// { type: 'cat' } | |
// { type: 'cat' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment