{"name":"load-module","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"4.0.1","description":"Standard dynamic imports with a few extra features","repository":{"type":"git","url":"git+https://github.com/75lb/load-module.git"},"license":"MIT","keywords":["load","require","module","package","import","esm"],"main":"./index.mjs","exports":"./index.mjs","engines":{"node":">=14"},"scripts":{"test":"test-runner test/*.mjs","cover":"c8 --reporter=text-lcov npm test | coveralls"},"devDependencies":{"c8":"^7.7.1","coveralls":"^3.1.0","current-module-paths":"^0.1.0","test-runner":"^0.9.1"},"dependencies":{"array-back":"^6.0.0"},"standard":{"ignore":["test/fixture","tmp"]},"gitHead":"6b2b1bbc4cc2947f51dc5c47051155e14035274b","bugs":{"url":"https://github.com/75lb/load-module/issues"},"homepage":"https://github.com/75lb/load-module#readme","_id":"load-module@4.0.1","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"integrity":"sha512-n7RB9jx1nYxeQzItFKRPnE+6n5Dyf1nUFB0SWWQuO+YLQ5tpn0N11yonYXyQ0eeODybYOQqRziUmldrKjwqLZQ==","shasum":"7daf8444f0c693055414e4758cb5931b30d40650","tarball":"http://registry-npm.ywwl.com/load-module/download/load-module-4.0.1.tgz","fileCount":4,"unpackedSize":7941,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiwQ4CRA9TVsSAnZWagAAwekP/1qnhSGtu/J/H+Sm0I1N\n41PqXE9qjjpUdx2DvRZR4z8O1YEh5q72UNBSbG01YWeA2al2JsoYtNpghmRa\n7WEJ4hQdrbPaeT9PotjhbzUh8/e6DS21CvpNe2VtzT0I61iDIQjEsMzydk2l\n/3YXf+Tds8LeoLh2MYSNQVSu4DcBS3Lh3+oQMhqTXF5zbJWOgDE/V5pI7eP5\ngkO6ParCb4XinMZZt2L97UvnSdFppkyeCY6X53JYjSnTtZrbiT8hdcY3bnT6\nAkwPlUU3X/u+BLoJJFys1Cls46GG2IB+fwlYeXzbw+FEFfXnBkw89lw7Dd9y\n0M/lq5ixWsYVMAdDq8HDO+LQohZ5e1IwSTqPATLbvX/8a5CizenghkoN8Kuo\n7hiopWTjnEUAwrV+roh4Mquo9GGinc/FAk4iX69fY6dFes5A7wO2v7P9MM6/\nmawAkiE3KLO/G1J8VzK0aRPPEUPfTbMQ3mYvQzDO4HsQ+rU9NrR3XvzqPGsq\ni95vT1IREhpdXMXNIR3wH+oP5tP8vgFOkxNCqPSBzrMlubwMcxhUwlil5CXv\nDhaD8KUX3GzJC94rbnyTRDl3BxsYwRgzucJw2NG/syZ5a1XRkvOl9r896Ld6\n82/7svvOldefvNY6kjIBn8xkuZeMnMYjXOSEZCxeL/nX2I8xATFhgYab9dVt\nq7XF\r\n=lSfn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDB4zczvq/HFG8/HfnP1jOXafA+Ikn+VDYcRNaQfgMbKQIhAKSmIL/A18gFXfRTlyXnjXtA32Gfe7fC0iHTZEe8ofs/"}],"size":2816,"noattachment":false,"key":"/load-module/-/load-module-4.0.1.tgz"},"_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"directories":{},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/load-module_4.0.1_1619723320047_0.5714987406794665"},"_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":1619723320199,"_cnpm_publish_time":1619723320199,"dist-tags":{"latest":"5.0.0","next":"4.0.0-2"}}