没有合适的资源?快使用搜索试试~ 我知道了~
parent-module:获取父模块的路径
共19个文件
js:7个
ts:2个
md:2个
需积分: 24 0 下载量 184 浏览量
2021-05-26
03:30:25
上传
评论
收藏 8KB ZIP 举报
温馨提示
父模块 获取父模块的路径 Node.js公开了module.parent ,但它只为您提供了第一个缓存的父级,不一定是实际的父级。 安装 $ npm install parent-module 用法 // bar.js const parentModule = require ( 'parent-module' ) ; module . exports = ( ) => { console . log ( parentModule ( ) ) ; //=> '/Users/sindresorhus/dev/unicorn/foo.js' } ; // foo.js const bar = require ( './bar' ) ; bar ( ) ; 原料药 parentModule(filePath?) 默认情况下,它将返回直接父级的路径。 文件路径 类型: string
资源推荐
资源详情
资源评论
收起资源包目录
parent-module-main.zip (19个子文件)
parent-module-main
.gitignore 23B
package.json 745B
.npmrc 19B
index.js 656B
test.js 359B
.github
security.md 179B
workflows
main.yml 450B
funding.yml 119B
license 1KB
readme.md 2KB
index.test-d.ts 170B
.gitattributes 19B
fixtures
filepath
1.js 32B
2.js 71B
3.js 126B
main
1.js 32B
2.js 112B
.editorconfig 175B
index.d.ts 651B
共 19 条
- 1
资源评论
胡説个球
- 粉丝: 25
- 资源: 4613
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功