{"name":"load-module","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"0.2.5","description":"Like node's require but with a few extra features","repository":{"type":"git","url":"git+https://github.com/75lb/load-module.git"},"license":"MIT","keywords":["load","require","module","package"],"engines":{"node":">=4.0.0"},"scripts":{"test":"test-runner test/*.js","docs":"jsdoc2md -t README.hbs index.js > README.md; echo"},"devDependencies":{"jsdoc-to-markdown":"^4.0.1","test-runner":"^0.5.0"},"dependencies":{"array-back":"^2.0.0"},"files":["index.js"],"gitHead":"2461c381468692014222cc3b8f321890615d1248","bugs":{"url":"https://github.com/75lb/load-module/issues"},"homepage":"https://github.com/75lb/load-module#readme","_id":"load-module@0.2.5","_npmVersion":"6.1.0","_nodeVersion":"10.3.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"dist":{"integrity":"sha512-acXlurP0P0BK05VWvKWXZf1qtE35sMLv0q2vp7PVXALULM2n0j6OLg9+9G8HzUadHEBBoYJuQa6M9nVhjKnWbg==","shasum":"d434ebe6542d9e810e0bfda23e89a262bb68f1d8","tarball":"http://registry-npm.ywwl.com/load-module/download/load-module-0.2.5.tgz","fileCount":5,"unpackedSize":6677,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDelWCRA9TVsSAnZWagAAwhgQAJFFCOohXZpuSRQUFCNG\n3OSXosZbA9eG2EFqTXC3Fgmujr2ipfdFwRhSy2D72ZvkOQAVa8cW39pRVEdC\nu3qYqd8Gx09aLuaPCeCsaAbuPHN9QWPhMFCuX78c1qXyF2/TctMh/cLlTizZ\nW5eLJ1Km/lcou/bJfwgfippQ50FLU6l5WaBIxurnWhU+14AeXFsTc/0nmBJe\nSethskENUFHQ30DA+A91cXp1mqrUzoGySK3cRgLPzSSql1sSuVnJI5uzReTl\nExRiCpcv+ihZA69f8bOkL3jufaOfv/qvLBwdcwO8+Gi8FeBrxKNDqGv3r2wI\n4mY81jiNolnbdeJ3OvN9hDP3M9nDJ94mrgu3ksVOnDkq/z3FTjiicS26QvdF\nAZyK6F8vvB65tyJBqeOtQ14uwJVcrctZg1n5w2o38uSgB7TWTrswQUbeFjAQ\nVIQwuYvKGOwFUyQVwsxY44DUaIjION6ZU2UIjWgXVDxZKLcU8SGWLOgi60JG\nbZtI6VB3HobgSw+FgMCSGUEfpMTxYwqvc7f/UwkQ0K78rClIaBntmiN9URAh\nRJN0A1aV/Y2RNpUKUVJumSM1VTcV0yigxuDLsYgB6Q5SPnjZfD9sZ4mNlGHK\nT4FJ6R5AAMZOv/9BL85YZjpDMYqdccSO89TUADxvcMp+2xyUERjIX/BO+85x\nOY7s\r\n=gaJk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+YzzAxsxjIHREszVxXvw4QcNGR06+Qol+YrzkRo9TsAiAzHGPLKSsS287ycmI3pEIZW7ZWj12MWoWh1brLPj3AiQ=="}],"size":2575,"noattachment":false,"key":"/load-module/-/load-module-0.2.5.tgz"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/load-module_0.2.5_1527638358478_0.8336460156261691"},"_hasShrinkwrap":false,"readme":"[![view on npm](https://badgen.net/npm/v/load-module)](https://www.npmjs.org/package/load-module)\n[![npm module downloads](https://badgen.net/npm/dt/load-module)](https://www.npmjs.org/package/load-module)\n[![Gihub repo dependents](https://badgen.net/github/dependents-repo/75lb/load-module)](https://github.com/75lb/load-module/network/dependents?dependent_type=REPOSITORY)\n[![Gihub package dependents](https://badgen.net/github/dependents-pkg/75lb/load-module)](https://github.com/75lb/load-module/network/dependents?dependent_type=PACKAGE)\n[![Node.js CI](https://github.com/75lb/load-module/actions/workflows/node.js.yml/badge.svg)](https://github.com/75lb/load-module/actions/workflows/node.js.yml)\n[![Coverage Status](https://coveralls.io/repos/github/75lb/load-module/badge.svg)](https://coveralls.io/github/75lb/load-module)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n# load-module\n\nStandard [dynamic imports](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#dynamic_imports) intended for runtime loading of user-defined modules (e.g. plugins).\n\n- Search for modules in one or more specific folders.\n- Specify a base folder from which to resolve from (e.g. the current working directory).\n\n## Synopsis\n\n```js\nimport { loadModule } from 'load-module'\n\nconst ViewClass = await loadModule('default-view', { paths: '~/my-view-folder'})\nconst view = new ViewClass()\n```\n\n## load-module\n\n* [load-module](#module_load-module)\n    * [loadModule(specifier, options)](#module_load-module.loadModule)\n    * [loadModuleSpecifier(specifier)](#module_load-module.loadModuleSpecifier)\n    * [loadModuleResolvedFrom(specifier, paths)](#module_load-module.loadModuleResolvedFrom)\n    * [loadModuleRelativeTo(specifier, paths)](#module_load-module.loadModuleRelativeTo)\n\n### <a name=\"module_load-module.loadModule\">loadModule(specifier, options)</a>\n\n**Kind**: exported function\n\n| Param | Type | Description |\n| ---   | ---  | --- |\n| specifier | `string` | A valid Node.js module specifier. |\n| options.paths | `string[]` | One or more directories to pass to both `loadModuleResolvedFrom` and `loadModuleRelativeTo`. |\n| options.resolvedFromPaths | `string[]` | Specific directories to pass to `loadModuleResolvedFrom`. |\n| options.relativeToPaths | `string[]` | Specific directories to pass to `loadModuleRelativeTo`. |\n\n<a name=\"module_load-module.loadModuleSpecifier\"></a>\n\n### loadModuleSpecifier(specifier)\n\n**Kind**: exported function\n\n| Param | Type | Description |\n| --- | --- | --- |\n| specifier | `string` | A valid Node.js module specifier. |\n\n<a name=\"module_load-module.loadModuleResolvedFrom\"></a>\n\n### loadModuleResolvedFrom(specifier, paths)\n\n**Kind**: exported function\n\n| Param | Type | Description |\n| --- | --- | --- |\n| specifier | `string` | A valid Node.js module specifier. |\n| paths | `string` \\| `Array.<string>` | One or more additional directories from which to resolve the supplied specifier from. |\n\n<a name=\"module_load-module.loadModuleRelativeTo\"></a>\n\n### loadModuleRelativeTo(specifier, paths)\n\n**Kind**: exported function\n\n| Param | Type | Description |\n| --- | --- | --- |\n| specifier | `string` | A valid module path. |\n| paths | `string` \\| `Array.<string>` | One or more additional directories in which to search for the supplied module path. |\n\n\n* * *\n\n&copy; 2017-21 Lloyd Brookes \\<75pound@gmail.com\\>.\n\nTested by [test-runner](https://github.com/test-runner-js/test-runner). Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).\n","publish_time":1527638358575,"_cnpm_publish_time":1527638358575,"dist-tags":{"latest":"5.0.0","next":"4.0.0-2"}}