UNPKG

steamapi-cloudflare-workers

Version:

A nice Steam API wrapper for Cloudflare Workers

19 lines (17 loc) 440 B
class Achievement { constructor(achievement) { this.api = achievement.apiname; this.name = achievement.name; this.description = achievement.description; this.achieved = Boolean(achievement.achieved); this.unlockTime = achievement.unlocktime; } /** * @type {Date} Date when this achievement was unlocked at. * @readonly */ get unlockedAt() { return new Date(this.unlockTime * 1000); } } module.exports = Achievement;