node-which:像which(1)Unix命令一样。 在PATH中找到可执行文件的第一个实例

时间:2021-05-02 13:19:07
【文件属性】:
文件名称:node-which:像which(1)Unix命令一样。 在PATH中找到可执行文件的第一个实例
文件大小:37KB
文件格式:ZIP
更新时间:2021-05-02 13:19:07
JavaScript 哪一个 像unix的which实用程序。 在PATH环境变量中查找指定可执行文件的第一个实例。 不缓存结果,因此在PATH更改时不需要使用hash -r 。 用法 var which = require ( 'which' ) // async usage which ( 'node' , function ( er , resolvedPath ) { // er is returned if no "node" is found on the PATH // if it is found, then the absolute path to the exec is returned } ) // or promise which ( 'node' ) . then ( resolvedPath => { ... } ) . catch ( er => { ... not fo
【文件预览】:
node-which-master
----.travis.yml(57B)
----gen-changelog.sh(238B)
----bin()
--------node-which(985B)
----package.json(1KB)
----test()
--------windows.js(251B)
--------basic.js(5KB)
--------bin.js(3KB)
----LICENSE(765B)
----package-lock.json(117KB)
----CONTRIBUTING.md(78B)
----appveyor.yml(348B)
----which.js(3KB)
----.gitignore(37B)
----CHANGELOG.md(3KB)
----README.md(1KB)

网友评论