{"name":"load-module","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"4.0.0-0","description":"Node's `require` with a few extra features","repository":{"type":"git","url":"git+https://github.com/75lb/load-module.git"},"license":"MIT","keywords":["load","require","module","package"],"main":"index.mjs","engines":{"node":">=14"},"scripts":{"test":"test-runner test/*.mjs","docs":"jsdoc2md -c jsdoc.conf -t README.hbs index.mjs > README.md; echo","cover":"nyc --reporter=text-lcov npm test | coveralls"},"devDependencies":{"coveralls":"^3.1.0","jsdoc-to-markdown":"^7.0.1","nyc":"^15.1.0","test-runner":"^0.8.14"},"dependencies":{"array-back":"^6.0.0"},"standard":{"ignore":["test/fixture","tmp"]},"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[![Build Status](https://travis-ci.org/75lb/load-module.svg?branch=master)](https://travis-ci.org/75lb/load-module)\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) but with a few additional features:\n\n- You can supply specific folders in which to search for modules (e.g. any local directory).\n- You can specify a base folder from which to resolve from (e.g. the current working directory).\n\n## Synopsis\n\n```\n> const loadModule = require('load-module')\n> loadModule('react-dom')\n> loadModule('something.mjs', { paths: process.cwd() })\n> loadModule('something.mjs', { paths: [process.cwd(), '~/my-modules'] })\n```\n\n<a name=\"module_load-module\"></a>\n\n## load-module\n\n* [load-module](#module_load-module)\n    * [.loadModuleSpecifier(specifier)](#module_load-module.loadModuleSpecifier)\n    * [.loadModuleResolvedFrom(specifier, paths)](#module_load-module.loadModuleResolvedFrom)\n    * [.loadModulePathRelativeTo(specifier, paths)](#module_load-module.loadModulePathRelativeTo)\n\n<a name=\"module_load-module.loadModuleSpecifier\"></a>\n\n### loadModule.loadModuleSpecifier(specifier)\n**Kind**: static method of [<code>load-module</code>](#module_load-module)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| specifier | <code>string</code> | A valid Node.js module specifier. |\n\n<a name=\"module_load-module.loadModuleResolvedFrom\"></a>\n\n### loadModule.loadModuleResolvedFrom(specifier, paths)\n**Kind**: static method of [<code>load-module</code>](#module_load-module)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| specifier | <code>string</code> | A valid Node.js module specifier. |\n| paths | <code>string</code> \\| <code>Array.&lt;string&gt;</code> | One or more additional directories from which to resolve the supplied specifier from. |\n\n<a name=\"module_load-module.loadModulePathRelativeTo\"></a>\n\n### loadModule.loadModulePathRelativeTo(specifier, paths)\n**Kind**: static method of [<code>load-module</code>](#module_load-module)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| specifier | <code>string</code> | A valid module path. |\n| paths | <code>string</code> \\| <code>Array.&lt;string&gt;</code> | 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","readmeFilename":"README.md","gitHead":"1e55e00813777f28f7bd84d7febba92df125240b","bugs":{"url":"https://github.com/75lb/load-module/issues"},"homepage":"https://github.com/75lb/load-module#readme","_id":"load-module@4.0.0-0","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"integrity":"sha512-RkyQLbTL79h5YljgCE/SDr3zxrY2Lr9mXOC1SYSVzzovEdTCX6LV24V2F7XHQ3ilVc/Myy2UIsK/eqX3z9fNww==","shasum":"43313b68f11dce2a5cbc8806f6bee7649247d958","tarball":"http://registry-npm.ywwl.com/load-module/download/load-module-4.0.0-0.tgz","fileCount":5,"unpackedSize":8803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghGhBCRA9TVsSAnZWagAAuEcP/i5Cns6ALyCixEBd/62d\nlxt9fyRJBPcjTuEvMrCyHxwMI2yzG2DBl/ZeIxOj17thOXuO8g3GRaTUo0+v\n32zbw5wEut8zJ1+7lEqo0jtBZjuDXXRMj3kgy4HMkK7QoQ3HrR939X6Pyh2p\nkM1KGaBGHMdBHB3lb3k45BnsHszv6lGJGkvnVw6H8o+6Pe/bu9IXSXdZYs7w\nUFDGXOdjgL+GuR4FDXvEAOrCdmDgo//ePGGVrkF+O+SlfPVh0iihoXcXM8JG\nAuXbA0l4RNG6DWlFNlavRmIjd5hLweSubnkFzlXYLGMP4vVwVNxhjA4XB1m2\nAAsSOShudhIQZXUr1IKzo+IPKBkOYj6FfnC0sIwJDz+2uCEu9XwDMJhoF6ob\nGXeasQjYllhuAWykirOyYhd6STVqKwMKL0yOGK98weDfM31NgCswjm0lBok7\n6hTwb9Pcbho88I9xCsLQ3OYDiJChovTOgtD/huFXU0ZEzyAse5x7TNJRdixY\n4EDZZmTUMyQ6h5YHJCg3OkD525MJ+IKfe3GzMGDyYRN0wJ0xq3OD9/ntrqtG\nGHt2Kl3UAdmrfnGMLrHpmnwFR21K6eVlL6PfvHr7ViO0yNT+a353YJWBQPGA\nUy9/1GV7KHAp47qazLXbhH2O8wYRqS3eaHFYUCXzOlMKabtaNz8gCwprHf5a\nL/jB\r\n=dfyg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7rmIB4ANYH80LYNWMC/PlAhnx6/s1wr25KBNdJm402AIhAKIMXXSBNIJA+2BNgrHzne56Kz0ZBdcg87tvBUBkEVx4"}],"size":2688,"noattachment":false,"key":"/load-module/-/load-module-4.0.0-0.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.0-0_1619290177066_0.8669348490965225"},"_hasShrinkwrap":false,"publish_time":1619290177211,"_cnpm_publish_time":1619290177211,"dist-tags":{"latest":"5.0.0","next":"4.0.0-2"}}