mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
1 line
1.4 KiB
JSON
1 line
1.4 KiB
JSON
{"ast":null,"code":"/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","map":{"version":3,"sources":["/app/node_modules/dom-helpers/esm/hasClass.js"],"names":["hasClass","element","className","classList","contains","baseVal","indexOf"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,QAAT,CAAkBC,OAAlB,EAA2BC,SAA3B,EAAsC;AACnD,MAAID,OAAO,CAACE,SAAZ,EAAuB,OAAO,CAAC,CAACD,SAAF,IAAeD,OAAO,CAACE,SAAR,CAAkBC,QAAlB,CAA2BF,SAA3B,CAAtB;AACvB,SAAO,CAAC,OAAOD,OAAO,CAACC,SAAR,CAAkBG,OAAlB,IAA6BJ,OAAO,CAACC,SAA5C,IAAyD,GAA1D,EAA+DI,OAA/D,CAAuE,MAAMJ,SAAN,GAAkB,GAAzF,MAAkG,CAAC,CAA1G;AACD","sourcesContent":["/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}"]},"metadata":{},"sourceType":"module"} |