Skip to content

Instantly share code, notes, and snippets.

@ahmadnassri
Last active March 23, 2016 03:21
Show Gist options
  • Save ahmadnassri/987af4cb6762f77b7089 to your computer and use it in GitHub Desktop.
Save ahmadnassri/987af4cb6762f77b7089 to your computer and use it in GitHub Desktop.
require collision
module.exports = {
type: 'animal'
}
var animal = require('./animal')
animal.type = 'cat'
module.exports = animal
var animal = require('./animal')
animal.type = 'dog'
module.exports = animal
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