@iyowei/untildify
v1.0.0
Published
转换 '~/Development/OpenSource' 波浪路径(虚拟路径)为绝对路径。
Downloads
2
Readme
@iyowei/untildify
转换 "~/Development/OpenSource" 波浪路径(虚拟路径)为绝对路径。
使用
untildify(path)
path
,{ String },波浪路径
import { log } from "console";
import { untildify } from "@iyowei/untildify";
log(untildify("~/Development/OpenSource`"));
// 自动获取系统根目录,/Users/iyowei/Development/OpenSource
untildifyWith(path, replacement)
path
,{ String },波浪路径replacement
,{ String },指定替换路径
import { log } from "console";
import { untildifyWith } from "@iyowei/untildify";
log(log(untildifyWith('~/iyowei', '/dfafsdf/')););
// /dfafsdf/iyowei
安装
# Pnpm
pnpm add @iyowei/untildify
# yarn
yarn add @iyowei/untildify
# npm
npm add @iyowei/untildify