Socket
Socket
Sign inDemoInstall

@babel/plugin-syntax-async-generators

Package Overview
Dependencies
Maintainers
5
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-syntax-async-generators - npm Package Compare versions

Comparing version 7.0.0-beta.49 to 7.0.0-beta.50

6

package.json
{
"name": "@babel/plugin-syntax-async-generators",
"version": "7.0.0-beta.49",
"version": "7.0.0-beta.50",
"description": "Allow parsing of async generator functions",

@@ -12,3 +12,3 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-async-generators",

"dependencies": {
"@babel/helper-plugin-utils": "7.0.0-beta.49"
"@babel/helper-plugin-utils": "7.0.0-beta.50"
},

@@ -19,4 +19,4 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "7.0.0-beta.49"
"@babel/core": "7.0.0-beta.50"
}
}
# @babel/plugin-syntax-async-generators
> Allow parsing of async generator functions.
> Allow parsing of async generator functions
## Example
See our website [@babel/plugin-syntax-async-generators](https://new.babeljs.io/docs/en/next/babel-plugin-syntax-async-generators.html) for more information.
**Syntax**
## Install
```javascript
async function* agf() {
await 1;
}
```
Using npm:
```js
async function f() {
for await (let x of y) {
g(x);
}
}
```
## Installation
```sh
npm install --save-dev @babel/plugin-syntax-async-generators
npm install --save @babel/plugin-syntax-async-generators
```
## Usage
or using yarn:
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"plugins": ["@babel/plugin-syntax-async-generators"]
}
```
### Via CLI
```sh
babel --plugins @babel/plugin-syntax-async-generators script.js
yarn add --save @babel/plugin-syntax-async-generators
```
### Via Node API
```javascript
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-syntax-async-generators"]
});
```
## References
* [Proposal: Asynchronous iteration for ECMAScript](https://github.com/tc39/proposal-async-iteration)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc