
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
flow-typestrip
Advanced tools
flow-typestrip is a recast based transform to remove Flow type annotations from typed JavaScript code, so that the code can be executed in JavaScript environments.
Alternatives: react-tools also strips type annotations. You should use it if you are also using React / JSX.
$ npm install [-D] flow-typestrip
flow-typstrip comes with a command-line interface that can be used when installed globally. Here is how to convert a single file and print to stdout:
$ flow-typestrip source.js
To compile many files at once, specify an output directory:
$ flow-typestrip -o dist src/**/*.js
To enable source maps for this files, add the --source-maps flag.
var flowStrip = require('flow-typestrip');
var result = flowStrip.compile(source, {
sourceFileName: 'example.js',
sourceMapName: 'example.js.map'
});
fs.writeFileSync('result.js', result.code);
fs.writeFileSync('result.js.map', JSON.stringify(result.map));
flow-typestrip can directly be used with browserify:
$ browserify -t flow-typestrip script.js
If you look at the main transform function, it is very simple. To ensure that the types are stripped correctly, I'm using the unit tests from jstransform.
FAQs
A Recast based transform to remove Flow type annotations.
The npm package flow-typestrip receives a total of 4 weekly downloads. As such, flow-typestrip popularity was classified as not popular.
We found that flow-typestrip 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.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.