'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var validate_validate = require('../validate/validate.js');

/**
 * 格式化路径
 * @param path 文件路径，或目录路径
 * @returns 格式化后的路径
 * @example
 * ```ts
 * normalizePath('xxx/xxx/xxx');
 *
 * normalizePath('xxx\\xxx\\xxx');
 * ```
 */
var normalizePath = function normalizePath(path) {
  return validate_validate.isWindows() ? path.replace(/\\/g, '/') : path;
};

exports.normalizePath = normalizePath;
