Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-jsx-event-modifiers

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-jsx-event-modifiers - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

index.js

@@ -112,3 +112,3 @@ module.exports = babel => {

path.node.attributes.forEach(attribute => {
if (attribute.name.type !== 'JSXNamespacedName' || attribute.name.namespace.name.indexOf('on') !== 0) {
if (t.isJSXSpreadAttribute(attribute) || attribute.name.type !== 'JSXNamespacedName' || attribute.name.namespace.name.indexOf('on') !== 0) {
return attributes.push(attribute)

@@ -115,0 +115,0 @@ }

{
"name": "babel-plugin-jsx-event-modifiers",
"version": "1.0.2",
"version": "1.0.3",
"description": "JSX Syntactic Sugar Plugin for Event Modifiers",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -10,2 +10,15 @@ import test from 'ava'

test('ignore spread', t => {
t.is(
transpile(`<input {...a} onKeyUp:prevent={this.method} />`),
`var _this = this;
<input {...a} onKeyUp={event => {
event.preventDefault();
_this.method(event);
}} />;`
)
})
test(':{ keyCode } modifier', t => {

@@ -12,0 +25,0 @@ t.is(

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