Artifact Content
Artifact bae8da53ce7820029a35d38f407d518f0c9fc42dde5144ff5c790783ac50260c:
- File public/nexus-js/lib/models/toggle.js — part of check-in [12a9bb700d] at 2021-08-11 18:56:04 on branch trunk — Import from git Added a changelog (user: dev size: 319)
'use strict'; export default class Toggle { constructor(state) { this.state = state || false; } flip(state) { if (state || state === false) { this.state = state; } else { this.state = !this.state; } } on() { this.state = true; } off() { this.state = false; } }