
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
export-all.macro
Advanced tools
A macro for babel-plugin-macros that allows you to export all files that match a glob
A babel-plugin-macro that allows you to export all files that match a glob
You want to export all files that match a glob
without having to export them
individually.
This is a babel-plugin-macro which allows you to export files that
match a glob. It supports export
statements for synchronous resolution.
This module is distributed via npm which is bundled with node and
should be installed as one of your project's devDependencies
:
npm install --save-dev export-all.macro
Once you've configured babel-plugin-macros
you can
import/require export-all.macro
.
The exportAll
functions accept a glob
and will transpile your code
to export statements for each file that matches the given glob.
Let's imagine you have a directory called my-files
with the files
a.js
, b.js
, c.js
, and d.js
.
Here are a few before/after examples:
exportAll
uses static exports: README:1 exportAll
uses static exports
import exportAll from 'export-all.macro'
exportAll('./files/*.js')
↓ ↓ ↓ ↓ ↓ ↓
export * from './files/a.js'
export * from './files/b.js'
export * from './files/c.js'
export * from './files/d.js'
Some static analysis tools (like ESLint, Flow, and Jest) wont like this very much
without a little additional work. So Jest's watch mode may not pick up all your
tests that are relevant based on changes and some ESLint plugins
(like eslint-plugin-import
) will probably fail on this.
I'm not aware of any, if you are please make a pull request and add it here!
Thanks goes to these people (emoji key):
Aaron Reisman 💻 📖 ⚠️ 🔧 💡 📓 |
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT
FAQs
A macro for babel-plugin-macros that allows you to export all files that match a glob
The npm package export-all.macro receives a total of 0 weekly downloads. As such, export-all.macro popularity was classified as not popular.
We found that export-all.macro 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.