{"name":"import-modules","version":"2.1.0","description":"Import all modules in a directory","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-files.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["import","require","files","modules","all","directory","folder","js","paths","multiple","index"],"devDependencies":{"ava":"^2.4.0","xo":"^0.25.3"},"xo":{"ignores":["fixture"]},"gitHead":"7a79bb113b2db5be3e6ef9dcbc060f5a6a5c7fca","bugs":{"url":"https://github.com/sindresorhus/import-files/issues"},"homepage":"https://github.com/sindresorhus/import-files#readme","_id":"import-modules@2.1.0","_nodeVersion":"15.4.0","_npmVersion":"6.14.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A==","shasum":"abe7df297cb6c1f19b57246eb8b8bd9664b6d8c2","tarball":"http://registry-npm.ywwl.com/import-modules/download/import-modules-2.1.0.tgz","fileCount":4,"unpackedSize":4526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3xuoCRA9TVsSAnZWagAAqrwP/jq8xKzjwnwOURZqQWZm\nHeq6maQT4dSbjwgRwsTTH+Rj1MFWHWLFa5xntIm0c9b5MPe4oNaaYsc9GFSS\nyeqieHOFhfVm4TQ7T4oRTXJjceVcqzdNf4qmD6DpWQ26fprc+/TnYb6NBRGo\nmYqDmnNod1e/CZXH/1CAPvSezruIB1TMGhUThHNIyL+M0dSmZzx5vkrfsfZQ\n8IUilQ4J+c6TomG2aUQ4MSa6DqZ1CNvK6ZRM+tlbTztgyQxlrWlQPb7k+l+5\nJpNHWRRyJwHB2kX6ks44ErOItRANnhDPvS4OZ3BAwaGQ2snH8hOE+nEs5qVT\n6HahEGiFPku7XZAWmpG0wZO3EhQ5SoQrrlS8/WxdOgNQGC6jBTLfv+A/Ni9p\nSOQrsfkltAyCUhly1Bhm0tHsAlaY/QKge+9YzsRZ5qyigNfaES1/KKPcT8UE\nIRuMBG7AB23dLuFCntGN4Qdg43MhzLzoaHwQkkfA8EgwIHWeK3vH8mHSSn9q\nq7oGOkHp9vah+XEWiqxYvFiB+X0FjqNmsNfZ+eglkvCyzoMMkBTHygPezIhZ\nsekN0v3rbxskejNljyESK9MmafoCHDkK/Z/u3T5eooI8hVNND+snCB5ytaIC\n63dUr7sSTxCJASGmQtSkVzLCxIjBBBamk9FAF2oisWmf2BPzZ7Outz0YBQg4\nh251\r\n=1Gy+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH75s4pmwg6OI6v+ML4ge2TdP59ZE1QsOz6VanoN7zMKAiEAgoXgf3x/d6Rqi2uhlqlE+7hd8rHfeimcrz4/Wn6bzpo="}],"size":2311,"noattachment":false,"key":"/import-modules/-/import-modules-2.1.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-modules_2.1.0_1608457127655_0.7776579378835198"},"_hasShrinkwrap":false,"readme":"# import-modules\n\n> Import all modules in a directory\n\n*This package is intentionally simple. Not interested in more features.*\n\n## Install\n\n```\n$ npm install import-modules\n```\n\n## Usage\n\n```\n.\n└── directory\n    ├── foo-bar.js\n    └── baz-faz.js\n```\n\n```js\nconst importModules = require('import-modules');\n\nconst modules = importModules('directory');\n\nconsole.log(modules);\n//=> {fooBar: [Function], bazFaz: [Function]}\n```\n\n## API\n\n### importModules(directory?, options?)\n\n#### directory\n\nType: `string`\\\nDefault: `__dirname`\n\nDirectory to import modules from. Unless you've set the `fileExtensions` option, that means any `.js`, `.json`, `.node` files, in that order. Does not recurse. Ignores the caller file and files starting with `.` or `_`.\n\n#### options\n\nType: `object`\n\n##### camelize\n\nType: `boolean`\\\nDefault: `true`\n\nConvert dash-style names (`foo-bar`) and snake-style names (`foo_bar`) to camel-case (`fooBar`).\n\n##### fileExtensions\n\nType: `string[]`\\\nDefault: `['.js', '.json', '.node']`\n\nFile extensions to look for. Order matters.\n\n## Related\n\n- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path\n- [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory\n- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily\n","publish_time":1608457127799,"_cnpm_publish_time":1608457127799,"dist-tags":{"latest":"3.2.0"}}