yarn-global
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -40,4 +40,3 @@ 'use strict' | ||
try { | ||
const dir = getDirectory() | ||
return fs.readdirSync(dir).indexOf(name) !== -1 | ||
return fs.existsSync(path.join(getDirectory(), name)) | ||
} catch (_) { | ||
@@ -44,0 +43,0 @@ return false |
{ | ||
"name": "yarn-global", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A set of useful methods for @yarnpkg", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -27,4 +27,4 @@ # yarn-global | ||
yarnGlobal.hasPackage('minimist') | ||
// Check if it's in `/User/name/.config/yarn/global/node_modules` directory | ||
// you may not install it by `yarn global add` | ||
// Check if `/User/name/.config/yarn/global/node_modules/minimist` exists | ||
// you may not have installed it by `yarn global add` | ||
//=> true | ||
@@ -31,0 +31,0 @@ ``` |
4529
51