mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
2 lines
571 B
JavaScript
Vendored
2 lines
571 B
JavaScript
Vendored
var p=/^(attrs|props|on|nativeOn|class|style|hook)$/,c=function(i){return i.reduce(function(s,o){var r,t,e,n,a;for(e in o)if(r=s[e],t=o[e],r&&p.test(e))if(e==="class"&&(typeof r=="string"&&(a=r,s[e]=r={},r[a]=!0),typeof t=="string"&&(a=t,o[e]=t={},t[a]=!0)),e==="on"||e==="nativeOn"||e==="hook")for(n in t)r[n]=u(r[n],t[n]);else if(Array.isArray(r))s[e]=r.concat(t);else if(Array.isArray(t))s[e]=[r].concat(t);else for(n in t)r[n]=t[n];else s[e]=o[e];return s},{})};function u(f,i){return function(){f&&f.apply(this,arguments),i&&i.apply(this,arguments)}}export{c as b};
|