UNPKG

@eljs/utils

Version:
11 lines 239 B
/** * 解析 windows 系统路径 * @param path 文件路径 */ export function winPath(path) { var isExtendedLengthPath = /^\\\\\?\\/.test(path); if (isExtendedLengthPath) { return path; } return path.replace(/\\/g, '/'); }