UNPKG

@kiwicom/orbit-components

Version:

Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.

25 lines (18 loc) 618 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _splitToWords = _interopRequireDefault(require("./splitToWords")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var insertGap = function insertGap(values, gap) { var array = (0, _splitToWords.default)(values); if (array) { return array.map(function (col, i, arr) { return gap && i + 1 < arr.length ? "".concat(col, " ").concat(gap) : col; }).join(" "); } return undefined; }; var _default = insertGap; exports.default = _default;