UNPKG

led-canvas-led

Version:

Example LED class to be used by https://github.com/marionebl/led-canvas

47 lines (39 loc) 973 B
"use strict"; var _classProps = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; var _extends = function (child, parent) { child.prototype = Object.create(parent.prototype, { constructor: { value: child, enumerable: false, writable: true, configurable: true } }); child.__proto__ = parent; }; var Store = require("./store"); var State = (function (Store) { var State = function State(initial) { Store.call(this, initial); }; _extends(State, Store); _classProps(State, null, { factory: { writable: true, value: function (initial) { return new State(initial); } }, is: { writable: true, value: function (obj) { return Object.is(this.get(), obj); } } }); return State; })(Store); module.exports = State;