
Security News
AI Agent Lands PRs in Major OSS Projects, Targets Maintainers via Cold Outreach
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.
rewrite-async
Advanced tools
Rewrite async functions as generators; via RegExp
Unlike async-to-gen, this does not register a runtime. Instead, the "transpiling" occurs only as needed.
Also, this is only executes a string conversion! You will have to look to other modules in order to execute the returned string.
Note: Although
eval()will work, it's generally (and strongly) not recommended.
Built with Bluebird.coroutine in mind. :wink:
$ npm install --save rewrite-async
const rewriteAsync = require('rewrite-async');
rewriteAsync('async function (one, two) {}');
//=> 'function* (one, two) {}'
rewriteAsync('var foo = async (req, res) => {}');
//=> 'var foo = function* (one, two) {}'
rewriteAsync('async one => await foo(one)');
//=> 'function* (one) {return yield foo(one)}'
Type: string
A function's contents (via .toString()) or any utf-8 string that contains function definitions.
MIT © Luke Edwards
FAQs
Rewrite async functions as generators; via RegExp
We found that rewrite-async 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
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.

Security News
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.