mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
2.3 KiB
JSON
1 line
2.3 KiB
JSON
{"ast":null,"code":"/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;","map":{"version":3,"sources":["/app/node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js"],"names":["jssPropsSort","sort","prop0","prop1","length","onProcessStyle","style","rule","type","newStyle","props","Object","keys","i"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAT,GAAwB;AACtB,MAAIC,IAAI,GAAG,SAASA,IAAT,CAAcC,KAAd,EAAqBC,KAArB,EAA4B;AACrC,QAAID,KAAK,CAACE,MAAN,KAAiBD,KAAK,CAACC,MAA3B,EAAmC;AACjC,aAAOF,KAAK,GAAGC,KAAR,GAAgB,CAAhB,GAAoB,CAAC,CAA5B;AACD;;AAED,WAAOD,KAAK,CAACE,MAAN,GAAeD,KAAK,CAACC,MAA5B;AACD,GAND;;AAQA,SAAO;AACLC,IAAAA,cAAc,EAAE,SAASA,cAAT,CAAwBC,KAAxB,EAA+BC,IAA/B,EAAqC;AACnD,UAAIA,IAAI,CAACC,IAAL,KAAc,OAAlB,EAA2B,OAAOF,KAAP;AAC3B,UAAIG,QAAQ,GAAG,EAAf;AACA,UAAIC,KAAK,GAAGC,MAAM,CAACC,IAAP,CAAYN,KAAZ,EAAmBL,IAAnB,CAAwBA,IAAxB,CAAZ;;AAEA,WAAK,IAAIY,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGH,KAAK,CAACN,MAA1B,EAAkCS,CAAC,EAAnC,EAAuC;AACrCJ,QAAAA,QAAQ,CAACC,KAAK,CAACG,CAAD,CAAN,CAAR,GAAqBP,KAAK,CAACI,KAAK,CAACG,CAAD,CAAN,CAA1B;AACD;;AAED,aAAOJ,QAAP;AACD;AAXI,GAAP;AAaD;;AAED,eAAeT,YAAf","sourcesContent":["/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;\n"]},"metadata":{},"sourceType":"module"} |