1.1.8 • Published 2 years ago
@yxfan-cli-dev/formatpath v1.1.8
@yxfan-cli-dev/formatPath
TODO: 适配macOS和windows macOS的路径以‘/’分割,而windows以‘\’分割,需要统一转化成‘/’
Usage
const formatpath = require('@yxfan-cli-dev/formatPath');
const path = '\Users\yxfan\cli\yxfan-dev-cli';
console.log(formatpath(path));
// /Users/yxfan/cli/yxfan-dev-cli