Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
babel-sugar-v-bind-sync
Advanced tools
Babel syntactic sugar for v-bind sync modifier support in Vue JSX
Syntactic sugar for v-bind sync
modifier in JSX.
This repo is only compatible with Babel 7.x, for 6.x please use njleonzhang/babel-plugin-vue-jsx-sync
Install the dependencies:
# for yarn:
yarn add -D babel-sugar-v-bind-sync
# for npm:
npm install babel-sugar-v-bind-sync --save-dev
In your .babelrc
:
module.exports = {
plugins: [require('babel-sugar-v-bind-sync')]
}
This plugin adds v-bind sync
modifier to the JSX and tries to mirror the same behavior as in vue-template-compiler, with a few differences:
_
) instead of dot (.
) for sync
modifier (prop_sync={this.bar}
).propName_sync
) in JSX, but you can use kebab-case too (prop-name_sync
).export default {
data() {
return {
bar: 'naz',
};
},
render(h) {
return (
<div>
<component foo_sync={this.bar} />
</div>
);
},
};
FAQs
Babel syntactic sugar for v-bind sync modifier support in Vue JSX
We found that babel-sugar-v-bind-sync 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.