{"name":"req-cwd","version":"2.0.0","description":"Require a module like `require()` but from the current working directory","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/req-cwd.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["require","resolve","path","module","from","like","cwd","current","working","directory","import"],"dependencies":{"req-from":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"800a75b0fd54003cac624662c4103b881f30d2f8","bugs":{"url":"https://github.com/sindresorhus/req-cwd/issues"},"homepage":"https://github.com/sindresorhus/req-cwd#readme","_id":"req-cwd@2.0.0","_shasum":"d4082b4d44598036640fb73ddea01ed53db49ebc","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d4082b4d44598036640fb73ddea01ed53db49ebc","tarball":"http://registry-npm.ywwl.com/req-cwd/download/req-cwd-2.0.0.tgz","integrity":"sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICG/mzLEaV4LP20yIurfKoerj0br+2cXyq+LMllUDVJcAiEAm8vHEmrpApyveff5TgvWdDfQhu5ju/eqH21vB6lfsmI="}],"size":1778,"noattachment":false,"key":"/req-cwd/-/req-cwd-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/req-cwd-2.0.0.tgz_1493371186151_0.068817533319816"},"directories":{},"readme":"# req-cwd [![Build Status](https://travis-ci.org/sindresorhus/req-cwd.svg?branch=master)](https://travis-ci.org/sindresorhus/req-cwd)\n\n> Require a module like [`require()`](https://nodejs.org/api/globals.html#globals_require) but from the current working directory\n\n\n## Install\n\n```\n$ npm install --save req-cwd\n```\n\n\n## Usage\n\n```js\nconst reqCwd = require('req-cwd');\n\n// Target module is at '/Users/sindresorhus/unicorn/foo.js'\n\nconsole.log(__dirname);\n//=> '/Users/sindresorhus/rainbow'\n\nconsole.log(process.cwd());\n//=> '/Users/sindresorhus/unicorn'\n\nconst foo = reqCwd('./foo');\n```\n\n\n## API\n\n### reqCwd(moduleId)\n\nLike `require()`, throws when the module can't be found.\n\n### reqCwd.silent(moduleId)\n\nReturns `null` instead of throwing when the module can't be found.\n\n#### moduleId\n\nType: `string`\n\nWhat you would use in `require()`.\n\n\n## Related\n\n- [req-from](https://github.com/sindresorhus/req-from) - Require a module from a given path\n- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module from a given path\n- [resolve-cwd](https://github.com/sindresorhus/resolve-cwd) - Resolve the path of a module from the current working directory\n- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point\n- [lazy-req](https://github.com/sindresorhus/lazy-req) - Require modules lazily\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","publish_time":1493371187969,"_cnpm_publish_time":1493371187969,"dist-tags":{"latest":"3.0.0"}}