nicecode-v2/packages/func/es/utils/index.d.ts

37 lines
1.2 KiB
TypeScript

export { default as isChrome } from './isChrome';
export declare const matchS3Prefix: (str: string) => boolean;
/**
* 通过文件名获取文件类型
* @param fileName 文件名称
* @returns 文件类型
*/
export declare const getFileSuffix: (fileName: string) => string;
/**
* 通过类型获取文件名
* @param type 类型
* @returns
*/
export declare const getImageSuffixByFileType: (type: string) => string;
export declare function getChromeVersion(): number | false;
export declare const nextTick: (func: (value: void) => void | PromiseLike<void>) => void;
export declare const loop: (items: string | any[], callback: (arg0: any) => any) => void;
export declare const addEventListenerWrapper: (target: any, eventType: string, cb: any, option?: any) => {
remove: () => void;
};
/**
* Get transforms base on the given object.
* @param {Object} obj - The target object.
* @returns {string} A string contains transform values.
*/
export declare function getTransforms({ rotate, scaleX, scaleY, translateX, translateY, }: {
rotate?: number;
scaleX?: number;
scaleY?: number;
translateX?: number;
translateY?: number;
}): {
WebkitTransform: string;
msTransform: string;
transform: string;
};