@iyowei/is-tilde-path
v1.0.0
Published
识别路径是否类似 '~/Development/OpenSource'。
Downloads
2
Readme
isTildePath(path)
识别路径是否类似
~/Development/OpenSource
。
使用
path
,{ String },路径
import { log } from 'console';
import isTildePath from '@iyowei/is-tilde-path';
log(isTildePath('~/Development/OpenSource`')); // true
log(isTildePath('/Users/iyowei/Development/OpenSource`')); // false
安装
# Pnpm
pnpm add @iyowei/is-tilde-path
# yarn
yarn add @iyowei/is-tilde-path
# npm
npm add @iyowei/is-tilde-path