Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
babel-plugin-get-rid-of-async-await
Advanced tools
Turn async functions into non-async functions.
Why would you ever do that? I'm building a generic testing wrapper that allows me to reuse the same pageobjects for enzyme/chimp/cypress.io/webdriverio. The idea is that in tests I only use page objects, and the underlying implementation of them is hidden from a user. Unfortunately, some of the API - like cypress.io or chimp 1.0 or not async/await compatible, while for enzyme it's a must. This way I can use the same code in both, by using different BABEL_ENV.
In
async function foo() {
await bar();
}
Out
function foo() {
bar();
}
npm install --save-dev babel-plugin-get-rid-of-async-await
.babelrc
(Recommended).babelrc
Without options:
{
"plugins": ["babel/transform-get-rid-of-async-await"]
}
babel --plugins babel/transform-get-rid-of-async-await
require("babel/core").transform("code", {
plugins: ["babel/transform-get-rid-of-async-await"]
});
FAQs
Get-rid-of-async-await
The npm package babel-plugin-get-rid-of-async-await receives a total of 9 weekly downloads. As such, babel-plugin-get-rid-of-async-await popularity was classified as not popular.
We found that babel-plugin-get-rid-of-async-await 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.