Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
decaffeinate-parser
Advanced tools
This project uses the official CoffeeScript parser to parse CoffeeScript source code, then maps the AST generated by the parser to one more suitable for the decaffeinate project based on the AST generated by CoffeeScriptRedux.
This project might be useful to anyone who wants to work with a CoffeeScript AST and prefers the AST generated by CoffeeScriptRedux, but wants to avoid the source compatibility issues introduced by using that project. Note that it is not 100% compatible with CoffeeScriptRedux:
if
statements, etc. have blocks for bodies.TemplateLiteral
from ES6 rather
than being a series of nested ConcatOp
nodes.Herestring
rather than String
.LogicalNotOp
generated by an unless
) are
marked as such with a virtual: true
property.do
is handled with the DoOp
node type.for-in
loops do not have an implicit step
property.super
is supported in classes.extends
is usable as a binary operator and in class declarations.//
(floor division) is supported.$ npm install --save-dev decaffeinate-parser
This example gets the names of the parameters in the add
function:
import { parse } from 'decaffeinate-parser';
const program = parse('add = (a, b) -> a + b');
const assignment = program.body.statements[0];
const fn = assignment.expression;
console.log(fn.parameters.map(param => param.data)); // [ 'a', 'b' ]
FAQs
A better AST for CoffeeScript, inspired by CoffeeScriptRedux.
The npm package decaffeinate-parser receives a total of 13,029 weekly downloads. As such, decaffeinate-parser popularity was classified as popular.
We found that decaffeinate-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.