UNPKG

smooth-scrollbar

Version:

Customize scrollbar in modern browsers with smooth scrolling experience.

24 lines 751 B
import clamp from 'lodash.clamp'; export function range(min, max) { if (min === void 0) { min = -Infinity; } if (max === void 0) { max = Infinity; } return function (proto, key) { var alias = "_" + key; Object.defineProperty(proto, key, { get: function () { return this[alias]; }, set: function (val) { Object.defineProperty(this, alias, { value: clamp(val, min, max), enumerable: false, writable: true, configurable: true, }); }, enumerable: true, configurable: true, }); }; } //# sourceMappingURL=range.js.map