ensl_gathers/lib/chat/author.js

17 lines
297 B
JavaScript
Raw Normal View History

2015-07-21 14:10:24 +00:00
"use strict";
// Method which caches a single instance for each author
var Authors = (function () {
var authors = {};
return function (author) {
if (authors[author.id]) {
return authors[author.id]
} else {
return authors[author.id] = author;
}
};
})();
module.exports = Authors;