UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

12 lines (11 loc) 277 B
import { Store } from "./Store.js"; /** Store a boolean. */ export class BooleanStore extends Store { constructor(value = false, time) { super(value, time); } /** Toggle the current boolean value. */ toggle() { this.value = !this.value; } }