codecombat/app/core/SystemNameLoader.coffee

10 lines
262 B
CoffeeScript

CocoClass = require './CocoClass'
namesCache = {}
class SystemNameLoader extends CocoClass
getName: (id) -> namesCache[id]?.name
setName: (system) -> namesCache[system.get('original')] = {name: system.get('name')}
module.exports = new SystemNameLoader()