UNPKG

moomooio-client

Version:

MooMooIO-Client is a client-side wrapper API designed for the game MooMoo.io. This package aims to provide a simple yet powerful API for creating clones, mods, or plugins for MooMoo.io.

21 lines (16 loc) 399 B
export default class PropertyTracker<T> { constructor(protected content: T, protected register: T | undefined = undefined) {} set(content: T) { this.register = this.content; this.content = content; } isDiff() { return this.register !== this.content; } get current(): T { return this.content; } get previous() { return this.register; } }