import type { STDSize, Size } from '../types';
/**
* 解析尺寸配置
*
* Parse size configuration
* @param size - 尺寸配置 | size configuration
* @returns 标准尺寸格式 | standard size format
*/
export function parseSize(size: Size = 0): STDSize {
if (typeof size === 'number') return [size, size, size] as STDSize;
const [x, y = x, z = x] = size;
return [x, y, z];
}