Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fela-beautifier

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-beautifier - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

3

dist/fela-beautifier.js

@@ -11,3 +11,3 @@ (function (global, factory) {

} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};

@@ -522,2 +522,3 @@

var css = existingRenderToString();
return cssbeautify$1(css, babelHelpers.extends({}, defaultOptions, options));

@@ -524,0 +525,0 @@ };

@@ -1,1 +0,1 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.FelaBeautifier=n()}(this,function(){"use strict";function e(e,n){return n={exports:{}},e(n,n.exports),n.exports}function n(e,n){var o=e.renderToString.bind(e);return e.renderToString=function(){var e=o();return r(e,t.extends({},i,n))},e}var t={};t.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},t.extends=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};var o=e(function(e,n){!function(){function o(e,n){function t(e){return" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e}function o(e){return"'"===e||'"'===e}function r(e){return a>="a"&&a<="z"||a>="A"&&a<="Z"||a>="0"&&a<="9"||"-_*.:#[]".indexOf(e)>=0}function i(){var e;for(e=g;e>0;e-=1)m+=u.indent}function f(){m=b(m),R?m+=" {":(m+="\n",i(),m+="{"),"\n"!==s&&(m+="\n"),g+=1}function c(){var e;g-=1,m=b(m),m.length>0&&v&&(e=m.charAt(m.length-1),";"!==e&&"{"!==e&&(m+=";")),m+="\n",i(),m+="}",l.push(m),m=""}var u,l,a,s,p,h,d,g,y,S,b,A=0,x=e.length,m="",R=!0,v=!1;for(u=arguments.length>1?n:{},"undefined"==typeof u.indent&&(u.indent=" "),"string"==typeof u.openbrace&&(R="end-of-line"===u.openbrace),"boolean"==typeof u.autosemicolon&&(v=u.autosemicolon),b=String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/\s+$/,"")},d={Start:0,AtRule:1,Block:2,Selector:3,Ruleset:4,Property:5,Separator:6,Expression:7,URL:8},g=0,h=d.Start,S=!1,l=[],e=e.replace(/\r\n/g,"\n");A<x;)if(a=e.charAt(A),s=e.charAt(A+1),A+=1,o(y))m+=a,a===y&&(y=null),"\\"===a&&s===y&&(m+=s,A+=1);else if(o(a))m+=a,y=a;else if(S)m+=a,"*"===a&&"/"===s&&(S=!1,m+=s,A+=1);else if("/"!==a||"*"!==s){if(h===d.Start){if(0===l.length&&t(a)&&0===m.length)continue;if(a<=" "||a.charCodeAt(0)>=128){h=d.Start,m+=a;continue}if(r(a)||"@"===a){if(p=b(m),0===p.length)l.length>0&&(m="\n\n");else if("}"===p.charAt(p.length-1)||";"===p.charAt(p.length-1))m=p+"\n\n";else for(;;){if(s=m.charAt(m.length-1)," "!==s&&9!==s.charCodeAt(0))break;m=m.substr(0,m.length-1)}m+=a,h="@"===a?d.AtRule:d.Selector;continue}}if(h!==d.AtRule)if(h!==d.Block)if(h!==d.Selector)if(h!==d.Ruleset)if(h!==d.Property)if(h!==d.Separator)if(h!==d.Expression)h===d.URL&&")"===a&&m.charAt(m.length-1!=="\\")?(m+=a,h=d.Expression):m+=a;else{if("}"===a){c(),h=d.Start,g>0&&(h=d.Block);continue}if(";"===a){m=b(m),m+=";\n",h=d.Ruleset;continue}if(m+=a,"("===a&&"l"===m.charAt(m.length-2)&&"r"===m.charAt(m.length-3)&&"u"===m.charAt(m.length-4)){h=d.URL;continue}}else{if(!t(a)){m+=a,h=d.Expression;continue}o(s)&&(h=d.Expression)}else{if(":"===a){m=b(m),m+=": ",h=d.Expression,t(s)&&(h=d.Separator);continue}if("}"===a){c(),h=d.Start,g>0&&(h=d.Block);continue}m+=a}else{if("}"===a){c(),h=d.Start,g>0&&(h=d.Block);continue}if("\n"===a){m=b(m),m+="\n";continue}if(!t(a)){m=b(m),m+="\n",i(),m+=a,h=d.Property;continue}m+=a}else{if("{"===a){f(),h=d.Ruleset;continue}if("}"===a){c(),h=d.Start;continue}m+=a}else{if(r(a)){if(p=b(m),0===p.length)l.length>0&&(m="\n\n");else if("}"===p.charAt(p.length-1))m=p+"\n\n";else for(;;){if(s=m.charAt(m.length-1)," "!==s&&9!==s.charCodeAt(0))break;m=m.substr(0,m.length-1)}i(),m+=a,h=d.Selector;continue}if("}"===a){c(),h=d.Start;continue}m+=a}else{if(";"===a){m+=a,h=d.Start;continue}if("{"===a){p=b(m),f(),h="@font-face"===p?d.Ruleset:d.Block;continue}m+=a}}else S=!0,m+=a,m+=s,A+=1;return m=l.join("")+m}"undefined"!=typeof n?e.exports=n=o:"object"===("undefined"==typeof window?"undefined":t.typeof(window))&&(window.cssbeautify=o)}()}),r=o&&"object"==typeof o&&"default"in o?o.default:o,i={indent:" ",openbrace:"end-of-line",autosemicolon:!1},f=function(e){return function(t){return n(t,e)}};return f});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.FelaBeautifier=n()}(this,function(){"use strict";function e(e,n){return n={exports:{}},e(n,n.exports),n.exports}function n(e,n){var o=e.renderToString.bind(e);return e.renderToString=function(){var e=o();return r(e,t.extends({},i,n))},e}var t={};t.typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.extends=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e};var o=e(function(e,n){!function(){function o(e,n){function t(e){return" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e}function o(e){return"'"===e||'"'===e}function r(e){return a>="a"&&a<="z"||a>="A"&&a<="Z"||a>="0"&&a<="9"||"-_*.:#[]".indexOf(e)>=0}function i(){var e;for(e=y;e>0;e-=1)x+=u.indent}function f(){x=b(x),R?x+=" {":(x+="\n",i(),x+="{"),"\n"!==s&&(x+="\n"),y+=1}function c(){var e;y-=1,x=b(x),x.length>0&&v&&(e=x.charAt(x.length-1),";"!==e&&"{"!==e&&(x+=";")),x+="\n",i(),x+="}",l.push(x),x=""}var u,l,a,s,p,h,d,y,g,S,b,A=0,m=e.length,x="",R=!0,v=!1;for(u=arguments.length>1?n:{},"undefined"==typeof u.indent&&(u.indent=" "),"string"==typeof u.openbrace&&(R="end-of-line"===u.openbrace),"boolean"==typeof u.autosemicolon&&(v=u.autosemicolon),b=String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/\s+$/,"")},d={Start:0,AtRule:1,Block:2,Selector:3,Ruleset:4,Property:5,Separator:6,Expression:7,URL:8},y=0,h=d.Start,S=!1,l=[],e=e.replace(/\r\n/g,"\n");A<m;)if(a=e.charAt(A),s=e.charAt(A+1),A+=1,o(g))x+=a,a===g&&(g=null),"\\"===a&&s===g&&(x+=s,A+=1);else if(o(a))x+=a,g=a;else if(S)x+=a,"*"===a&&"/"===s&&(S=!1,x+=s,A+=1);else if("/"!==a||"*"!==s){if(h===d.Start){if(0===l.length&&t(a)&&0===x.length)continue;if(a<=" "||a.charCodeAt(0)>=128){h=d.Start,x+=a;continue}if(r(a)||"@"===a){if(p=b(x),0===p.length)l.length>0&&(x="\n\n");else if("}"===p.charAt(p.length-1)||";"===p.charAt(p.length-1))x=p+"\n\n";else for(;;){if(s=x.charAt(x.length-1)," "!==s&&9!==s.charCodeAt(0))break;x=x.substr(0,x.length-1)}x+=a,h="@"===a?d.AtRule:d.Selector;continue}}if(h!==d.AtRule)if(h!==d.Block)if(h!==d.Selector)if(h!==d.Ruleset)if(h!==d.Property)if(h!==d.Separator)if(h!==d.Expression)h===d.URL&&")"===a&&x.charAt(x.length-1!=="\\")?(x+=a,h=d.Expression):x+=a;else{if("}"===a){c(),h=d.Start,y>0&&(h=d.Block);continue}if(";"===a){x=b(x),x+=";\n",h=d.Ruleset;continue}if(x+=a,"("===a&&"l"===x.charAt(x.length-2)&&"r"===x.charAt(x.length-3)&&"u"===x.charAt(x.length-4)){h=d.URL;continue}}else{if(!t(a)){x+=a,h=d.Expression;continue}o(s)&&(h=d.Expression)}else{if(":"===a){x=b(x),x+=": ",h=d.Expression,t(s)&&(h=d.Separator);continue}if("}"===a){c(),h=d.Start,y>0&&(h=d.Block);continue}x+=a}else{if("}"===a){c(),h=d.Start,y>0&&(h=d.Block);continue}if("\n"===a){x=b(x),x+="\n";continue}if(!t(a)){x=b(x),x+="\n",i(),x+=a,h=d.Property;continue}x+=a}else{if("{"===a){f(),h=d.Ruleset;continue}if("}"===a){c(),h=d.Start;continue}x+=a}else{if(r(a)){if(p=b(x),0===p.length)l.length>0&&(x="\n\n");else if("}"===p.charAt(p.length-1))x=p+"\n\n";else for(;;){if(s=x.charAt(x.length-1)," "!==s&&9!==s.charCodeAt(0))break;x=x.substr(0,x.length-1)}i(),x+=a,h=d.Selector;continue}if("}"===a){c(),h=d.Start;continue}x+=a}else{if(";"===a){x+=a,h=d.Start;continue}if("{"===a){p=b(x),f(),h="@font-face"===p?d.Ruleset:d.Block;continue}x+=a}}else S=!0,x+=a,x+=s,A+=1;return x=l.join("")+x}"undefined"!=typeof n?e.exports=n=o:"object"===("undefined"==typeof window?"undefined":t.typeof(window))&&(window.cssbeautify=o)}()}),r=o&&"object"==typeof o&&"default"in o?o.default:o,i={indent:" ",openbrace:"end-of-line",autosemicolon:!1},f=function(e){return function(t){return n(t,e)}};return f});
{
"name": "fela-beautifier",
"version": "2.0.0",
"version": "3.0.0",
"description": "Fela enhancer to beautify CSS output",

@@ -29,4 +29,4 @@ "main": "index.js",

"peerDependencies": {
"fela": "2.0.0"
"fela": "3.0.0"
}
}

@@ -16,5 +16,5 @@ # fela-beautifier

<!-- Fela (Development): Unminified version including all warnings -->
<script src="https://unpkg.com/fela-beautifier@2.0.0/dist/fela-beautifier.js"></script>
<script src="https://unpkg.com/fela-beautifier@3.0.0/dist/fela-beautifier.js"></script>
<!-- Fela (Production): Minified version -->
<script src="https://unpkg.com/fela-beautifier@2.0.0/dist/fela-beautifier.min.js"></script>
<script src="https://unpkg.com/fela-beautifier@3.0.0/dist/fela-beautifier.min.js"></script>
```

@@ -21,0 +21,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc