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

babel-parser-minimal

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-parser-minimal

This is a minimal build of [`@babel/parser`](https://babeljs.io/docs/en/babel-parser), with most of the non-standard/proposal features stripped out. It is heavily minified and any unused code is attempted to be removed. It should work exactly the same as

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

@babel/parser minimal bundle

This is a minimal build of @babel/parser, with most of the non-standard/proposal features stripped out. It is heavily minified and any unused code is attempted to be removed. It should work exactly the same as @babel/parser (except for unsupported plugins), and any case where it emits different output is a bug.

It includes support for TypeScript and JSX, as well as standardized modern features. It does not support most proposals.

Supported plugins:

  • functionSent
  • estree
  • classProperties
  • classPrivateProperties
  • classPrivateMethods
  • moduleStringNames
  • topLevelAwait
  • jsx
  • typescript

Unsupported plugins:

  • placeholders
  • flow
  • decorators
  • v8intrinsic
  • importAssertions
  • moduleAttributes
  • flowComments
  • privateIn
  • recordAndTuple
  • functionBind
  • pipelineOperator
  • throwExpressions
  • doExpressions
  • partialApplication
  • decimal
  • classStaticBlock
  • decorators-legacy
  • exportDefaultFrom

Install

npm i -D babel-parser-minimal

API

The API is exactly the same as https://babeljs.io/docs/en/babel-parser#api, but if you attempt to use any unsupported plugin, it will throw an error.

Example

import { parse } from 'babel-parser-minimal'

// TS source code
const input = 'const foo: string = "bar"'
const ast = parse(input, { plugins: ['typescript'] })

FAQs

Package last updated on 01 Feb 2021

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