Created
September 17, 2015 08:07
-
-
Save izumskee/ff6b4ac8eafd1d9ce872 to your computer and use it in GitHub Desktop.
ES6 class in Meteor
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
// ES6 | |
class Tweet { | |
constructor (doc) { | |
_.extend(this, doc); | |
} | |
} | |
Tweets = new Mongo.Collection('tweets', { | |
transform (doc) { | |
return new Tweet(doc); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment