{"_id":"req-from","_rev":"9-551c4b3c15ad965d9387edd25e8d52fc","name":"req-from","description":"Require a module like `require()` but from a given path","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"req-from","version":"1.0.0","description":"Require a module like `require()` but from a given path","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/req-from"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["require","resolve","path","module","from","like","path"],"dependencies":{"resolve-from":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"bcfa8f84a6d2107e512aedf6d69ce2a05ce29686","bugs":{"url":"https://github.com/sindresorhus/req-from/issues"},"homepage":"https://github.com/sindresorhus/req-from","_id":"req-from@1.0.0","_shasum":"a52cd9fd0eab8cfe9668db814c62c5ff56811ca2","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a52cd9fd0eab8cfe9668db814c62c5ff56811ca2","tarball":"https://registry.npmjs.org/req-from/-/req-from-1.0.0.tgz","integrity":"sha512-7oSo76I5UXUXc2Gbqgv1z03IqC7XmXmuCICkaIeDNJVGGhgiy/NNk3tTwz6g/S0ww4Pctowxf47uhuAG86C8oA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE4SaQG+g8bGP/g8X7sLMmmF1BR8NUQPymHakRE1m01AAiEArVJPAXCf4+xocs162Ym5jE9xcpzhYGJuPeXZhwVJixE="}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.0.1":{"name":"req-from","version":"1.0.1","description":"Require a module like `require()` but from a given path","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/req-from"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["require","resolve","path","module","from","like","path"],"dependencies":{"resolve-from":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"c75bd5936b908973c054731c2826d831817eeb8f","bugs":{"url":"https://github.com/sindresorhus/req-from/issues"},"homepage":"https://github.com/sindresorhus/req-from","_id":"req-from@1.0.1","_shasum":"bf81da5147947d32d13b947dc12a58ad4587350e","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"bf81da5147947d32d13b947dc12a58ad4587350e","tarball":"https://registry.npmjs.org/req-from/-/req-from-1.0.1.tgz","integrity":"sha512-Ek4Uw4MlVg9p6bslygAlCZ6ICub9Jq4+xwapgFn0m5TOpspZNX/ZW676sojFTvwKk9zBESdMFkvZi4OjeNH6TQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHC2OKMVx1xWusG9rqmLoWToa8C16OwLabGdmjH/m4IwIhAIDmUbM0B7nWctc9BindixfjEjNvAbglv324BRW7PNzW"}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"2.0.0":{"name":"req-from","version":"2.0.0","description":"Require a module like `require()` but from a given path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/req-from.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","import","path"],"dependencies":{"resolve-from":"^3.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"6ee88e81131a96ddb3f943645e86105e5eccc8d6","bugs":{"url":"https://github.com/sindresorhus/req-from/issues"},"homepage":"https://github.com/sindresorhus/req-from#readme","_id":"req-from@2.0.0","_shasum":"d74188e47f93796f4aa71df6ee35ae689f3e0e70","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d74188e47f93796f4aa71df6ee35ae689f3e0e70","tarball":"https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz","integrity":"sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOK/8JZIgFXfgJEHdC9sRB5ywfyN4cv+zFu8qnD45dRQIgGVwQb/GySOofuJD/QNEoW8e9K5vNiN2JEyCu4LE698w="}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/req-from-2.0.0.tgz_1493370297812_0.7743019156623632"},"directories":{}},"3.0.0":{"name":"req-from","version":"3.0.0","description":"Require a module like `require()` but from a given path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/req-from.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"keywords":["require","resolve","path","module","from","like","import","path"],"dependencies":{"resolve-from":"^3.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"6ee88e81131a96ddb3f943645e86105e5eccc8d6","bugs":{"url":"https://github.com/sindresorhus/req-from/issues"},"homepage":"https://github.com/sindresorhus/req-from#readme","_id":"req-from@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-Th3/nQT8Nm2K/LdEROUm/ofyD/GTyJPEIzx9ppHmesl187c0a69pjgQtmgBMtpr+VqJ7bfpamUQHeLxSLK1csw==","shasum":"966c842a806f1ec18968936118e2eaf97f32ece9","tarball":"https://registry.npmjs.org/req-from/-/req-from-3.0.0.tgz","fileCount":4,"unpackedSize":3664,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4+83CRA9TVsSAnZWagAAadsP/2jaC7Ryb9feedCEht47\nPtjSj9Pjm08jTqIuf6/gZ6VFsWC4B51KdYHup78SVe+WW5vBRu4luphGjEi9\nMasUndVogGYyDqPSanO4kFQHuL9mL1arNQfvmAKLVVWwBjNiAng5XD3p9ju9\n/+2iiQIDflZqZZk1QueyRZ9ahFUAAqnJ0kRFAIxsT3Ivqbmoi5a+QT1ybpmY\n/6weX81Q1Tk7MFz1MN9kUnDv1e1PRm0A9Q9NoyTgJJ0nsFS7lCFk6Udq5Md5\nFuNwWNEDalmQOat7NCfu7LeKqRP3yFNI0mZbG3xgzZmco+Wn5oUW2VJ6qjpC\nHQHia2Wlfov/XMihyocSWi5+phZFvj9Er0/l+3e3jyOd+VL6wkEvogwaCMdd\njqy5Oz1Z9twHXrArLei8NkIgzGaPMb2rCVH2Q7E1JL1MlpaTsIk48PQQbW3A\nu0hBM/ushwt3mWjiUqSTJp7cTVvh6WmAOZFiqToSjHP9Ikq3KHwSTaEGt2AV\nRHwmYPGzBZGjQ8BAm3PLcCcyeKdM6qV0qd9yU00lRSGKPHzNfhes+/f5/BAf\naIHuFEWojrC7yUg0fd4W/5Qfx/C+SYuxdGSfCbqY/XjE/JVGUidyZn3SLbwC\nxdW5OrEEwKDz0S53Hu8SjCz4Pwcj3FcvZMOUloEgzEL34Hqdgi4tOg+h+dH+\njYi2\r\n=Pz8H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFVb1xi2oOLTTaqJUhA1nAdGCD23nGZJlMRslJALOmkRAiAEvail0N4oZZky6U/XLgfnMldsdGuOUzXkALfYMKaXgw=="}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/req-from_3.0.0_1541664566414_0.07078807190468384"},"_hasShrinkwrap":false,"deprecated":"Renamed to `import-from`."}},"readme":"# req-from [![Build Status](https://travis-ci.org/sindresorhus/req-from.svg?branch=master)](https://travis-ci.org/sindresorhus/req-from)\n\n> Require a module like [`require()`](https://nodejs.org/api/globals.html#globals_require) but from a given path\n\n\n## Install\n\n```\n$ npm install --save req-from\n```\n\n\n## Usage\n\n```js\nconst reqFrom = require('req-from');\n\n// There is a file at `./foo/bar.js`\n\nreqFrom('foo', './bar');\n```\n\n\n## API\n\n### reqFrom(fromDir, moduleId)\n\nLike `require()`, throws when the module can't be found.\n\n### reqFrom.silent(fromDir, moduleId)\n\nReturns `null` instead of throwing when the module can't be found.\n\n#### fromDir\n\nType: `string`\n\nDirectory to require from.\n\n#### moduleId\n\nType: `string`\n\nWhat you would use in `require()`.\n\n\n## Tip\n\nCreate a partial using a bound function if you want to require from the same `fromDir` multiple times:\n\n```js\nconst reqFromFoo = reqFrom.bind(null, 'foo');\n\nreqFromFoo('./bar');\nreqFromFoo('./baz');\n```\n\n\n## Related\n\n- [req-cwd](https://github.com/sindresorhus/req-cwd) - Require a module from the current working directory\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","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"time":{"modified":"2023-06-17T00:09:14.275Z","created":"2015-12-06T16:36:51.612Z","1.0.0":"2015-12-06T16:36:51.612Z","1.0.1":"2015-12-06T20:06:45.255Z","2.0.0":"2017-04-28T09:04:58.087Z","3.0.0":"2018-11-08T08:09:26.532Z"},"homepage":"https://github.com/sindresorhus/req-from#readme","keywords":["require","resolve","path","module","from","like","import","path"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/req-from.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/req-from/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"flumpus-dev":true}}