
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
node-glob-import
Advanced tools
Allows you to load several files with a single import statement using a glob pattern.
Import a list of files with a single import statement, using glob patterns.
First, you must enable the loader, which you can do by adding the --import=node-glob-import flag to node.
node --import=node-glob-import myscript.js
Then, you can make glob imports by adding the type: 'glob' attribute to the import:
// myscript.js
import somemodules from './somemodules/*.js' with { type: 'glob' };
import assert from 'node:assert';
// The imported value is an object where each key is a file found by the glob pattern...
assert(typeof somemodules === 'object');
assert('example.js' in somemodules);
// And the value for each key is a function that dynamically loads that file using `import()`.
const { default: example } = await somemodules['example']();
assert(example.foo === 'bar');
// somemodules/example.js
export default {
foo: 'bar',
};
FAQs
Allows you to load several files with a single import statement using a glob pattern.
The npm package node-glob-import receives a total of 2 weekly downloads. As such, node-glob-import popularity was classified as not popular.
We found that node-glob-import demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.