Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
import-folder
Advanced tools
Import or require all folder modules at once
While importing or requiring many modules from a folder, one may find necessity for something such as an index that exports each single file so that modules would be imported at once. This creates maintance problems, since you have to remember to export them every time.
Works with for both Typescript and Javascript modules!
import-folder
helps you import all exports within a folder at once
Use your favorite package manager to install. For instance:
yarn add import-folder
Then import it with ES or CommonJS:
import importFolder from 'import-folder'
Given an example folder helpers
with files named math.js
and prompt.ts
exporting example modules:
const modules = importFolder('helpers')
modules.math.add(2,2)
modules.prompt('Hello World')
Or directly deconstructing modules:
const { math, prompt } = importFolder('helpers')
math.add(2,2)
prompt('Hello World')
Run the test suit with yarn test
.
If you want to contribute in any of theses ways:
You can (and should) open an issue or even a pull request!
Thanks for your interest in contributing to this repo!
Luiz Felipe Zarco (felipezarco@hotmail.com)
This code is licensed under the MIT License. See the LICENSE.md file for more info.
FAQs
Import all exported modules from files in folder at once
The npm package import-folder receives a total of 0 weekly downloads. As such, import-folder popularity was classified as not popular.
We found that import-folder 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.