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

babel-plugin-transform-remove-imports

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-remove-imports - npm Package Compare versions

Comparing version 1.0.8 to 1.2.0

index.d.ts

8

lib/index.js

@@ -8,4 +8,3 @@ "use strict";

function _default(_ref) {
var t = _ref.types;
function _default() {
return {

@@ -16,2 +15,7 @@ name: "transform-remove-imports",

ImportDeclaration: function ImportDeclaration(path, state) {
if (state.opts.removeAll) {
path.remove();
return;
}
if (!state.opts.test) return;

@@ -18,0 +22,0 @@ if (!path.node.source || !path.node.source.value) return;

{
"name": "babel-plugin-transform-remove-imports",
"version": "1.0.8",
"version": "1.2.0",
"description": "Remove the specified import declaration when you use the babel transform to build the package.",

@@ -8,2 +8,3 @@ "repository": "https://github.com/uiwjs/babel-plugin-transform-remove-imports",

"scripts": {
"prepare": "npm run build",
"test": "jest --coverage",

@@ -43,4 +44,8 @@ "test:watch": "jest --watchAll --coverage",

},
"files": [
"lib",
"index.d.ts"
],
"author": "Kenny Wong",
"license": "MIT"
}

@@ -50,6 +50,11 @@ babel-plugin-transform-remove-imports

## Optiosn
- `test: string` Matches based on regular expressions.
- `removeAll: boolean` Delete all import packages.
## Programatic Usage
```js
import plugin from 'babel-plugin-transform-rename-import'
import plugin from 'babel-plugin-transform-remove-imports'
import { transform } from 'babel-core'

@@ -56,0 +61,0 @@

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