import-modules
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -45,3 +45,3 @@ 'use strict'; | ||
const exportKey = options.camelize ? filenameStem.replace(/-(\w)/g, (m, p1) => p1.toUpperCase()) : filenameStem; | ||
const exportKey = options.camelize ? filenameStem.replace(/[-_](\w)/g, (m, p1) => p1.toUpperCase()) : filenameStem; | ||
@@ -48,0 +48,0 @@ returnValue[exportKey] = require(fullPath); |
{ | ||
"name": "import-modules", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Import all modules in a directory", | ||
"license": "MIT", | ||
"repository": "sindresorhus/import-files", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
"url": "https://sindresorhus.com" | ||
}, | ||
@@ -37,3 +38,8 @@ "engines": { | ||
"xo": "^0.25.3" | ||
}, | ||
"xo": { | ||
"ignores": [ | ||
"fixture" | ||
] | ||
} | ||
} |
@@ -1,8 +0,7 @@ | ||
# import-modules [![Build Status](https://travis-ci.org/sindresorhus/import-modules.svg?branch=master)](https://travis-ci.org/sindresorhus/import-modules) | ||
# import-modules | ||
> Import all modules in a directory | ||
*This module is intentionally simple. Not interested in more features.* | ||
*This package is intentionally simple. Not interested in more features.* | ||
## Install | ||
@@ -14,3 +13,2 @@ | ||
## Usage | ||
@@ -20,3 +18,3 @@ | ||
. | ||
└── dir | ||
└── directory | ||
├── foo-bar.js | ||
@@ -35,3 +33,2 @@ └── baz-faz.js | ||
## API | ||
@@ -43,3 +40,3 @@ | ||
Type: `string`<br> | ||
Type: `string`\ | ||
Default: `__dirname` | ||
@@ -55,10 +52,10 @@ | ||
Type: `boolean`<br> | ||
Type: `boolean`\ | ||
Default: `true` | ||
Convert dash-style names (`foo-bar`) to camel-case (`fooBar`). | ||
Convert dash-style names (`foo-bar`) and snake-style names (`foo_bar`) to camel-case (`fooBar`). | ||
##### fileExtensions | ||
Type: `string[]`<br> | ||
Type: `string[]`\ | ||
Default: `['.js', '.json', '.node']` | ||
@@ -68,3 +65,2 @@ | ||
## Related | ||
@@ -71,0 +67,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4526
65