没有合适的资源?快使用搜索试试~ 我知道了~
locate-path:获取存在于多个路径的磁盘上的第一个路径
共17个文件
yml:2个
ts:2个
md:2个
需积分: 9 0 下载量 141 浏览量
2021-05-26
07:55:38
上传
评论
收藏 8KB ZIP 举报
温馨提示
定位路径 获取存在于多个路径的磁盘上的第一个路径 安装 $ npm install locate-path 用法 在这里,我们找到磁盘上存在的第一个文件(按阵列顺序)。 const locatePath = require ( 'locate-path' ) ; const files = [ 'unicorn.png' , 'rainbow.png' , // Only this one actually exists on disk 'pony.png' ] ; ( async ( ) => { console ( await locatePath ( files ) ) ; //=> 'rainbow' } ) ( ) ; 原料药 locatePath(路径,选项?) 为存在的第一个路径返回Promise<string> ,如果不存在则返回undefined 。 路
资源推荐
资源详情
资源评论
收起资源包目录
locate-path-main.zip (17个子文件)
locate-path-main
fixture
unicorn 0B
file-link 7B
directory-link 1B
.gitignore 23B
.github
security.md 179B
workflows
main.yml 436B
funding.yml 117B
.gitattributes 19B
package.json 786B
index.test-d.ts 1KB
readme.md 2KB
index.js 1KB
index.d.ts 2KB
test.js 3KB
.editorconfig 175B
license 1KB
.npmrc 19B
共 17 条
- 1
资源评论
泰国旅行
- 粉丝: 31
- 资源: 4773
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功