diff options
Diffstat (limited to 'node_modules/resolve-cwd/readme.md')
-rw-r--r-- | node_modules/resolve-cwd/readme.md | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/node_modules/resolve-cwd/readme.md b/node_modules/resolve-cwd/readme.md index 7f36e0296..46cdc36aa 100644 --- a/node_modules/resolve-cwd/readme.md +++ b/node_modules/resolve-cwd/readme.md @@ -1,8 +1,6 @@ # resolve-cwd [](https://travis-ci.org/sindresorhus/resolve-cwd) -> Resolve the path of a module like [`require.resolve()`](http://nodejs.org/api/globals.html#globals_require_resolve) but from the current working directory - -Unlike `require.resolve()` it returns `null` instead of throwing when the module can't be found. +> Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from the current working directory ## Install @@ -32,6 +30,12 @@ resolveCwd('./foo'); ### resolveCwd(moduleId) +Like `require()`, throws when the module can't be found. + +### resolveCwd.silent(moduleId) + +Returns `null` instead of throwing when the module can't be found. + #### moduleId Type: `string` @@ -44,9 +48,10 @@ What you would use in `require()`. - [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module from a given path - [req-from](https://github.com/sindresorhus/req-from) - Require a module from a given path - [req-cwd](https://github.com/sindresorhus/req-cwd) - Require a module from the current working directory +- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point - [lazy-req](https://github.com/sindresorhus/lazy-req) - Require modules lazily ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) |