UNPKG

@flexis/ui

Version:

Styleless React Components

35 lines (26 loc) 1.48 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property"); _Object$defineProperty(exports, "__esModule", { value: true }); exports.default = isCurrentValue; var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes")); var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array")); /** * Check is current value or not. * @param multiple - Value is array or not. * @param value - Current value. * @param option - Value to check. * @return result */ function isCurrentValue(multiple, value, option) { if (multiple) { if ((0, _isArray.default)(value)) { return (0, _includes.default)(value).call(value, option); } return false; } return value === option; } //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL2NvbW1vbi9pc0N1cnJlbnRWYWx1ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7Ozs7Ozs7QUFPYyxTQUFVLGNBQVYsQ0FDYixRQURhLEVBRWIsS0FGYSxFQUdiLE1BSGEsRUFHUDtBQUdOLE1BQUksUUFBSixFQUFjO0FBRWIsUUFBSSxzQkFBYyxLQUFkLENBQUosRUFBMEI7QUFDekIsYUFBTyx1QkFBQSxLQUFLLE1BQUwsQ0FBQSxLQUFLLEVBQVUsTUFBVixDQUFaO0FBQ0E7O0FBRUQsV0FBTyxLQUFQO0FBQ0E7O0FBRUQsU0FBTyxLQUFLLEtBQUssTUFBakI7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==