UNPKG

pay-sdk-react

Version:

A cross-platform payment SDK for React, supporting Alipay, WeChat Pay, PayPal, Stripe, Payssion, and Airwallex, compatible with H5, PC, and App environments.

31 lines 927 B
import _toConsumableArray from "@babel/runtime-corejs3/helpers/esm/toConsumableArray"; import { isArray, isObject, isString } from './is'; import warning from './warning'; export default function () { var _arguments = arguments; var length = arguments.length; var classNames = []; var _loop = function _loop() { var v = i < 0 || _arguments.length <= i ? undefined : _arguments[i]; if (!v) { return 1; // continue } if (isString(v)) { classNames.push(v); } else if (isArray(v)) { classNames = classNames.concat(v); } else if (isObject(v)) { Object.keys(v).forEach(function (k) { if (v[k]) { classNames.push(k); } }); } else { warning(true, 'arguments must be one of string/array/object.'); } }; for (var i = 0; i < length; i++) { if (_loop()) continue; } return _toConsumableArray(new Set(classNames)).join(' '); }