Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

import-modules

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-modules - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

2

index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc