mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
2.2 KiB
JSON
1 line
2.2 KiB
JSON
{"ast":null,"code":"'use strict';\n\nfunction replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp('(^|\\\\s)' + classToRemove + '(?:\\\\s|$)', 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n\nmodule.exports = function removeClass(element, className) {\n if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n};","map":{"version":3,"sources":["/app/node_modules/reactstrap/node_modules/dom-helpers/class/removeClass.js"],"names":["replaceClassName","origClass","classToRemove","replace","RegExp","module","exports","removeClass","element","className","classList","remove","setAttribute","baseVal"],"mappings":"AAAA;;AAEA,SAASA,gBAAT,CAA0BC,SAA1B,EAAqCC,aAArC,EAAoD;AAClD,SAAOD,SAAS,CAACE,OAAV,CAAkB,IAAIC,MAAJ,CAAW,YAAYF,aAAZ,GAA4B,WAAvC,EAAoD,GAApD,CAAlB,EAA4E,IAA5E,EAAkFC,OAAlF,CAA0F,MAA1F,EAAkG,GAAlG,EAAuGA,OAAvG,CAA+G,YAA/G,EAA6H,EAA7H,CAAP;AACD;;AAEDE,MAAM,CAACC,OAAP,GAAiB,SAASC,WAAT,CAAqBC,OAArB,EAA8BC,SAA9B,EAAyC;AACxD,MAAID,OAAO,CAACE,SAAZ,EAAuBF,OAAO,CAACE,SAAR,CAAkBC,MAAlB,CAAyBF,SAAzB,EAAvB,KAAgE,IAAI,OAAOD,OAAO,CAACC,SAAf,KAA6B,QAAjC,EAA2CD,OAAO,CAACC,SAAR,GAAoBT,gBAAgB,CAACQ,OAAO,CAACC,SAAT,EAAoBA,SAApB,CAApC,CAA3C,KAAmHD,OAAO,CAACI,YAAR,CAAqB,OAArB,EAA8BZ,gBAAgB,CAACQ,OAAO,CAACC,SAAR,IAAqBD,OAAO,CAACC,SAAR,CAAkBI,OAAvC,IAAkD,EAAnD,EAAuDJ,SAAvD,CAA9C;AACpL,CAFD","sourcesContent":["'use strict';\n\nfunction replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp('(^|\\\\s)' + classToRemove + '(?:\\\\s|$)', 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n\nmodule.exports = function removeClass(element, className) {\n if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n};"]},"metadata":{},"sourceType":"script"} |