Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
babel-plugin-chevrotain-serialize
Advanced tools
This plugin finds class declarations which inherit from `chevrotain.Parser`, serializes them, and passes this serialization into their constructor `super` calls, allowing your code to bypass parser grammar construction at runtime. This is especially usefu
This plugin finds class declarations which inherit from chevrotain.Parser
, serializes them, and passes this serialization into their constructor super
calls, allowing your code to bypass parser grammar construction at runtime. This is especially useful if you run your code through a minifier, as you’ll no longer have to avoid mangling token names.
npm install --save-dev babel-plugin-serialize-chevrotain-parsers
or
yarn add --dev babel-plugin-serialize-chevrotain-parsers
Add the plugin to your .babelrc.
{
"plugins": ["babel-plugin-serialize-chevrotain-parsers"]
}
The plugin will find Parser
references which are imported and referenced in one of four ways.
// method 1
import { Parser } from "chevrotain";
// method 2
const { Parser } = require("chevrotain");
// method 1 & 2 reference
class MyParser extends Parser {
}
// method 3
import * as chevrotain from "chevrotain";
// method 4
const chevrotain = require("chevrotain");
// method 3 & 4 reference
class MyParser extends chevrotain.Parser {
}
// will not work
const Parser1 = Parser;
// this will not be detected
class MyParser extends Parser1 {
}
FAQs
This plugin finds class declarations which inherit from `chevrotain.Parser`, serializes them, and passes this serialization into their constructor `super` calls, allowing your code to bypass parser grammar construction at runtime. This is especially usefu
The npm package babel-plugin-chevrotain-serialize receives a total of 2 weekly downloads. As such, babel-plugin-chevrotain-serialize popularity was classified as not popular.
We found that babel-plugin-chevrotain-serialize 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.