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.
45 lines (44 loc) • 2.08 kB
TypeScript
export declare function isArray(obj: any): obj is any[];
export declare function isObject(obj: any): obj is {
[key: string]: any;
};
export declare function isString(obj: any): obj is string;
export declare function isNumber(obj: any): obj is number;
export declare function isRegExp(obj: any): boolean;
export declare function isFile(obj: any): obj is File;
export declare function isBlob(obj: any): obj is Blob;
export declare function isColor(color: string): boolean;
export declare function isUndefined(obj: any): obj is undefined;
export declare function isNull(obj: any): obj is null;
export declare function isNullOrUndefined(obj: any): boolean;
export declare function isFunction(obj: any): obj is (...args: any[]) => any;
export declare function isEmptyObject(obj: any): boolean;
export declare function isEmptyReactNode(content: any, trim?: boolean): boolean;
export declare function isExist(obj: any): boolean;
export declare function isWindow(el: any): el is Window;
export declare function isBoolean(value: any): value is boolean;
export declare const isReactComponent: (element: any) => boolean;
export declare const isClassComponent: (element: any) => boolean;
export declare const isDOMElement: (element: any) => boolean;
export declare const isLink: (text?: React.ReactNode) => boolean;
export declare function isImageLinkAvailable(url: string): Promise<boolean>;
/**
* @zh 检测是否为移动设备
* @en Detect if it's a mobile device
*/
export declare function isMobileDevice(): boolean | undefined;
/**
* @zh 检测是否为触摸设备
* @en Detect if it's a touch device
*/
export declare function isTouchDevice(): boolean;
export declare function isEmail(email: string): boolean;
export declare function isSmsCode(code: string): boolean;
export declare function isUsPhoneNumber(phone: string): boolean;
export declare function isPromise(obj: unknown): obj is Promise<unknown>;
/**
* 判断是否为Android设备
* @returns 是否为Android设备
*/
export declare function isAndroid(): boolean;
export declare function isIOS(): boolean;