function attribute(node, name, original) {
      switch (name) {
        case 'class':
          if (OWNER_SVG_ELEMENT in node) return hyperAttribute(node, original);
          name = 'className';

        case 'data':
        case 'props':
          return hyperProperty(node, name);

        case 'style':
          return hyperStyle(node, original, OWNER_SVG_ELEMENT in node);

        case 'ref':
          return hyperRef(node);

        default:
          if (name.slice(0, 1) === '.') return hyperSetter(node, name.slice(1), OWNER_SVG_ELEMENT in node);
          if (name.slice(0, 2) === 'on') return hyperEvent(node, name);
          if (name in node && !(OWNER_SVG_ELEMENT in node || readOnly.test(name))) return hyperProperty(node, name);
          return hyperAttribute(node, original);
      }
    }
//    fully inspired by Preact library and its simplicity.
fully inspired by Preact library and its simplicity.
fully inspired by Preact library and its simplicity .
function attribute(node, name, original) {
      switch (name) {
        case 'class':
          if (OWNER_SVG_ELEMENT in node) return hyperAttribute(node, original);
          name = 'className';
        case 'data':
        case 'props':
          return hyperProperty(node, name);
        case 'style':
          return hyperStyle(node, original, OWNER_SVG_ELEMENT in node);
        case 'ref':
          return hyperRef(node);
        default:
          if (name.slice(0, 1) === '.') return hyperSetter(node, name.slice(1), OWNER_SVG_ELEMENT in node);
          if (name.slice(0, 2) === 'on') return hyperEvent(node, name);
          if (name in node && !(OWNER_SVG_ELEMENT in node || readOnly.test(name))) return hyperProperty(node, name);
          return hyperAttribute(node, original);
      }
    }
function attribute ( node , name , original ) { switch ( name ) { case 'class' : if ( OWNER_SVG_ELEMENT in node ) return hyperAttribute ( node , original ) ; name = 'className' ; case 'data' : case 'props' : return hyperProperty ( node , name ) ; case 'style' : return hyperStyle ( node , original , OWNER_SVG_ELEMENT in node ) ; case 'ref' : return hyperRef ( node ) ; default : if ( name . slice ( 0 , 1 ) === '.' ) return hyperSetter ( node , name . slice ( 1 ) , OWNER_SVG_ELEMENT in node ) ; if ( name . slice ( 0 , 2 ) === 'on' ) return hyperEvent ( node , name ) ; if ( name in node && ! ( OWNER_SVG_ELEMENT in node || readOnly . test ( name ) ) ) return hyperProperty ( node , name ) ; return hyperAttribute ( node , original ) ; } }
fully inspired by Preact library and its simplicity.
fully inspired by Preact library and its simplicity .