Socket
Socket
Sign inDemoInstall

babel-helper-vue-jsx-merge-props

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-helper-vue-jsx-merge-props - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

16

index.js

@@ -1,2 +0,2 @@

var nestRE = /^(attrs|props|on|nativeOn|class|style)$/
var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/

@@ -10,3 +10,8 @@ module.exports = function mergeJSXProps (objs) {

if (aa && nestRE.test(key)) {
if (Array.isArray(aa)) {
if (key === 'on' || key === 'nativeOn' || key === 'hook') {
// merge functions
for (nestedKey in bb) {
aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])
}
} else if (Array.isArray(aa)) {
a[key] = aa.concat(bb)

@@ -27,1 +32,8 @@ } else if (Array.isArray(bb)) {

}
function mergeFn (a, b) {
return function () {
a.apply(this, arguments)
b.apply(this, arguments)
}
}

2

package.json
{
"name": "babel-helper-vue-jsx-merge-props",
"version": "2.0.0",
"version": "2.0.1",
"description": "babel helper for vue jsx spread.",

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

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