{"name":"import-modules","version":"2.0.0","description":"Import all modules in a directory","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/import-files.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"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"},"gitHead":"399eaab58bf7d06b70a44cf94435f4de3740cfef","bugs":{"url":"https://github.com/sindresorhus/import-files/issues"},"homepage":"https://github.com/sindresorhus/import-files#readme","_id":"import-modules@2.0.0","_nodeVersion":"10.16.3","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw==","shasum":"9c1e13b4e7a15682f70a6e3fa29534e4540cfc5d","tarball":"http://registry-npm.ywwl.com/import-modules/download/import-modules-2.0.0.tgz","fileCount":4,"unpackedSize":4516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdla3rCRA9TVsSAnZWagAAR6cP/Rv/gndWdAHUJnJm5XSI\nQlm8oX3gQjIwM/WTYyshHYMsHKwWq3Go1OCPz3wvOH9FTR6z3ZdMZVgU3ur/\nfzKtBnemfnT2ZeASd29WwmEwFeRLQXP4m1m5uLyjLJypvNyqkKSNkv5dDQRk\nVfVwoCqc9E6MbquLzv2FYRwIS0GCDCSOAt5qby4EWE6u5hxdRPv87/paiZP6\nQp8/cOhP7PqoW7PL0t9S1EtDrghYPPEBjyHT5nLmGM3qBtTwZ11z0soMh12W\nxtijwFoqIobVcY7A8Hic8Em54RUt4X2ycGUxhDN7qtJRBVUojI9ijopV+jwx\ny8bmmMhJnE4DAH5Sv1kmdeLTfGzd16HqL6I49S3CzAp5DgoGdmVmTfgwnJGW\nCl22qSK0hXSTfxrYcbciGFqOfpu5E+6hKQUDH3g/GEjlMKuzH+Ghet7guaid\nH3SLOxGbuchG+14RaYfqDv5GMVikw/7lnGbuPlIWGGKJ25j5j80m9a4g2pHk\noO7f7KMOqMn9EIAA6qfkshXS3a812KaIYaYzeUHR2lHzHZA7Kpi4HlsEW9pG\nn7040M5s/DndAu/m54l60gm3uJXnAiMx91YmGu3IXWYWRqZ0eSu28HCovf9S\ni9jjRLpXdlpaVqJEe7dqZeGgxoHVOtJZSKoxd/5HXGoeEpz7y55d2SwLiWcC\nNWd7\r\n=U41T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDHy4+5M/pyekiHICx6BcX2IMULlV8m8jzWSdujNqV4nAiBDR+qWNXl6neLlrxWu8nnKKME3pVjijOiGmN6rOrSiNQ=="}],"size":2301,"noattachment":false,"key":"/import-modules/-/import-modules-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/import-modules_2.0.0_1570090474851_0.11424652361687437"},"_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":1570090474999,"_cnpm_publish_time":1570090474999,"dist-tags":{"latest":"3.2.0"}}