funda-ui
Version:
React components using pure Bootstrap 5+ which does not contain any external style and script libraries.
94 lines (92 loc) • 3.11 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["RPB"] = factory();
else
root["RPB"] = factory();
})(this, () => {
return /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "debounce": () => (/* binding */ debounce),
/* harmony export */ "throttle": () => (/* binding */ throttle)
/* harmony export */ });
/*
* Debounce
*
* @param {Function} fn - A function to be executed within the time limit.
* @param {Number} limit - Waiting time.
* @return {*} - Returns a new function.
*/
function debounce(fn) {
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
var timer;
return function () {
clearTimeout(timer);
timer = setTimeout(function () {
fn.apply(this, arguments);
}, limit);
};
}
/*
* Throttle
*
* @param {Function} fn - A function to be executed within the time limit.
* @param {Number} limit - Waiting time.
* @return {*} - Returns a new function.
*/
function throttle(fn) {
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;
var waiting = false;
return function () {
if (!waiting) {
fn.apply(this, arguments);
waiting = true;
setTimeout(function () {
waiting = false;
}, limit);
}
};
}
/******/ return __webpack_exports__;
/******/ })()
;
});