Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
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.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 5,342 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.