UNPKG

amf-codec

Version:

AMF0 codec with tiny size and high performance

18 lines (15 loc) 296 B
module.exports = class Memo { constructor (position = 0) { this.position = position; this.references = []; } consume (amount) { const position = this.position; this.position += amount; return position; } skip (amount) { this.position += amount; return this.position; } };