File: /home/imensosw/.npm/registry.npmjs.org/import-from/.cache.json
{"_id":"import-from","_rev":"4-c04d2687028fcfe6759beb1323adc0c1","name":"import-from","description":"Import a module like with `require()` but from a given path","dist-tags":{"latest":"2.1.0"},"versions":{"2.1.0":{"name":"import-from","version":"2.1.0","description":"Import a module like with `require()` but from a given path","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-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":"c7d2eb8ebdb94873445632b2273d2d52030a7dc8","bugs":{"url":"https://github.com/sindresorhus/import-from/issues"},"homepage":"https://github.com/sindresorhus/import-from#readme","_id":"import-from@2.1.0","_shasum":"335db7f2a7affd53aaa471d4b8021dee36b7f3b1","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"335db7f2a7affd53aaa471d4b8021dee36b7f3b1","tarball":"https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-from-2.1.0.tgz_1495358911498_0.48687195940874517"},"directories":{}}},"readme":"# import-from [](https://travis-ci.org/sindresorhus/import-from)\n\n> Import a module like with [`require()`](https://nodejs.org/api/globals.html#globals_require) but from a given path\n\n\n## Install\n\n```\n$ npm install --save import-from\n```\n\n\n## Usage\n\n```js\nconst importFrom = require('import-from');\n\n// There is a file at `./foo/bar.js`\n\nimportFrom('foo', './bar');\n```\n\n\n## API\n\n### importFrom(fromDir, moduleId)\n\nLike `require()`, throws when the module can't be found.\n\n### importFrom.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 import 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 import from the same `fromDir` multiple times:\n\n```js\nconst importFromFoo = importFrom.bind(null, 'foo');\n\nimportFromFoo('./bar');\nimportFromFoo('./baz');\n```\n\n\n## Related\n\n- [import-cwd](https://github.com/sindresorhus/import-cwd) - Import 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- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import modules lazily\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"time":{"modified":"2017-07-04T14:30:15.225Z","created":"2017-05-21T09:28:31.839Z","2.1.0":"2017-05-21T09:28:31.839Z"},"homepage":"https://github.com/sindresorhus/import-from#readme","keywords":["require","resolve","path","module","from","like","import","path"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-from.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/import-from/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"rocket0191":true},"_attachments":{},"_etag":"W/\"550aa1258aa7e4140fa0fe185e459673\"","_lastModified":"Sun, 27 May 2018 04:34:50 GMT","_cached":true}