UNPKG

funda-ui

Version:

React components using pure Bootstrap 5+ which does not contain any external style and script libraries.

109 lines (105 loc) 4.13 kB
(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 */ "convertArrToValByBraces": () => (/* binding */ convertArrToValByBraces), /* harmony export */ "convertArrToValByBrackets": () => (/* binding */ convertArrToValByBrackets), /* harmony export */ "convertStringByCommaToValByBraces": () => (/* binding */ convertStringByCommaToValByBraces), /* harmony export */ "convertStringByCommaToValByBrackets": () => (/* binding */ convertStringByCommaToValByBrackets) /* harmony export */ }); /** * Convert value to string separated by square brackets * @param {String} str such as: 1,2,3 * @returns {String} such as: [1][2][3] */ function convertStringByCommaToValByBrackets(str) { if (typeof str === 'undefined' || str === null || str === '') { return ''; } return str.split(',').map(function (v) { return v.toString().includes('[') && v.toString().includes(']') ? "".concat(v) : "[".concat(v, "]"); }).join(''); } /** * Convert array value to string separated by square brackets * @param {String[]} arr such as: ['1','2','3'] * @returns {String} such as: [1][2][3] */ function convertArrToValByBrackets(arr) { if (!Array.isArray(arr)) return ''; return arr.map(function (v) { return v.toString().includes('[') && v.toString().includes(']') ? "".concat(v) : "[".concat(v, "]"); }).join(''); } /** * Convert value to string separated by curly braces * @param {String} str such as: 1,2,3 * @returns {String} such as: {1}{2}{3} */ function convertStringByCommaToValByBraces(str) { if (typeof str === 'undefined' || str === null || str === '') { return ''; } return str.split(',').map(function (v) { return v.toString().includes('{') && v.toString().includes('}') ? "".concat(v) : "{".concat(v, "}"); }).join(''); } /** * Convert array value to string separated by curly braces * @param {String[]} arr such as: ['1','2','3'] * @returns {String} such as: {1}{2}{3} */ function convertArrToValByBraces(arr) { if (!Array.isArray(arr)) return ''; return arr.map(function (v) { return v.toString().includes('{') && v.toString().includes('}') ? "".concat(v) : "{".concat(v, "}"); }).join(''); } /******/ return __webpack_exports__; /******/ })() ; });