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

babel-plugin-export-toplevel

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-export-toplevel

A babel plugin that automatically exports all top-level names

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.3K
decreased by-12.32%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-export-toplevel

A simple transform to automatically export all top-level names.

This is mostly useful for testing purposes, so you can have access to these names in testing while not exporting them in other environments.

Effect

Transforms

const hiddenFunction = () => {};
const publicFunction = () => {};

export default publicFunction;

to something akin to

const hiddenFunction = () => {};
const publicFunction = () => {};

export default publicFunction;
export { publicFunction, hiddenFunction };

Install

npm i --save-dev babel-plugin-export-toplevel

Usage

.babelrc

{
  "plugins": ["export-toplevel"]
}

Keywords

FAQs

Package last updated on 12 Jul 2018

Did you know?

Socket

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.

Install

Related posts

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