UNPKG

led-matrix-ts

Version:

Highly customizable led matrix for the browser

21 lines 759 B
export class Exception { static throwIfNull(value, valueDescription) { if (value == null) { throw `${valueDescription} property cannot be set to null`; } } static throwIfNegative(value, valueDescription) { if (value < 0) { throw `${valueDescription} property cannot be set to a negative number (${value})`; } } static throwIfNotBetween(value, valueDescription, rangeFrom, rangeTo) { if (value < rangeFrom || value > rangeTo) { throw `Seek expects a value between ${rangeFrom} and ${rangeTo}`; } } static getDescriptionForProperty(className, methodName) { return `${className}'s ${methodName}`; } } //# sourceMappingURL=exception.js.map