UNPKG

lin3s-event-bus

Version:

Simple but powerful event bus written in ES2015

36 lines (27 loc) 987 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /* * This file is part of the EventBusJS library. * * Copyright (c) 2016-present LIN3S <info@lin3s.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @author Mikel Tuesta <mikeltuesta@gmail.com> */ var Priority = function Priority() { var priority = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; _classCallCheck(this, Priority); if (!(typeof priority === "number" && isFinite(priority) && Math.floor(priority) === priority)) { throw new TypeError('Priority must be an integer.'); } var privatePriority = priority; this.getPriority = function () { return privatePriority; }; }; exports.default = Priority;