UNPKG

poker-helper

Version:
15 lines (11 loc) 505 B
'use strict';var _receipt = require('./receipt');var _receipt2 = _interopRequireDefault(_receipt);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} function ReceiptCache() { this.cache = {}; } ReceiptCache.prototype.get = function get(receipt) { if (!receipt) {return null;} if (this.cache[receipt]) {return this.cache[receipt];} this.cache[receipt] = _receipt2.default.parse(receipt); return this.cache[receipt]; }; module.exports = ReceiptCache;