UNPKG

9gag

Version:

Download 9GAG posts and comments

21 lines (16 loc) 373 B
const Type = require('./type'); class Comment { constructor(id, timestamp, user, likes, type, content, reply) { this.id = id; this.timestamp = timestamp; this.user = user; this.likes = likes; this.type = type; this.content = content; this.reply = reply; } isText() { return this.type === Type.TEXT; } } module.exports = Comment;