Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@babel/plugin-syntax-function-sent
Advanced tools
@babel/plugin-syntax-function-sent is a Babel plugin that allows parsing of the `function.sent` meta-property in generator functions. This meta-property is used to access the value sent to the generator by the `next` method.
Parsing function.sent
This feature allows the generator function to access the value sent to it via the `next` method using the `function.sent` meta-property. This can be useful for handling values passed into the generator at different stages of its execution.
function* generator() {
console.log(function.sent);
yield;
}
const gen = generator();
gen.next('first'); // Logs: 'first'
gen.next('second'); // Logs: 'second'
@babel/plugin-syntax-async-generators is a Babel plugin that allows parsing of async generator functions. While it does not specifically handle `function.sent`, it provides similar functionality for async generators, enabling the use of `await` within generator functions.
Allow parsing of the function.sent meta property
See our website @babel/plugin-syntax-function-sent for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-function-sent
or using yarn:
yarn add @babel/plugin-syntax-function-sent --dev
v7.24.7 (2024-06-05)
babel-node
babel-traverse
constantViolations
with destructuring (@liuxingbaoyu)babel-helper-transform-fixture-test-runner
, babel-plugin-proposal-explicit-resource-management
using
in switch
correctly (@liuxingbaoyu)babel-helpers
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
FAQs
Allow parsing of the function.sent meta property
The npm package @babel/plugin-syntax-function-sent receives a total of 202,622 weekly downloads. As such, @babel/plugin-syntax-function-sent popularity was classified as popular.
We found that @babel/plugin-syntax-function-sent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.