reactive-props
Version:
An all-in-one implementation of the Reactive State for Data & DOM patterns.
1 lines • 908 B
JavaScript
var domHandler=function(t){"use strict";var e=Object.defineProperties,n=Object.keys,r=function(t,e,n,r,o){return{configurable:!0,get:function(){return r},set:function(u){(t||u!==r||e&&"object"==typeof u&&u)&&(r=u,n?o.call(this,r):o.call(this))}}},o=function(t,e,o,i,a,c){for(var l={},f=a!==u,s=[o,i,f],v=n(t),b=0;b<v.length;b++){var d=e(t,v[b]),h=f?a(d):[d,a];c&&(h[1]=c),l[v[b]]=r.apply(null,s.concat(h))}return l},u=function(){};return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.all,r=void 0!==n&&n,i=t.shallow,a=void 0===i||i,c=t.useState,l=void 0===c?u:c,f=t.getAttribute,s=void 0===f?function(t,e){return t.getAttribute(e)}:f;return function(t,n,u){var i=o(n,(function(e,n){var r=e[n],o=typeof r;return t.hasOwnProperty(n)?(r=t[n],delete t[n]):t.hasAttribute(n)&&(r=s(t,n),"number"==o?r=+r:"boolean"==o&&(r=!/^(?:false|0|)$/.test(r))),r}),r,a,l,u);return e(t,i)}}}();