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 3.0.5 to 3.0.6

48

dist/fela-beautifier.js

@@ -14,2 +14,26 @@ (function (global, factory) {

babelHelpers.classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
babelHelpers.createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
babelHelpers.extends = Object.assign || function (target) {

@@ -29,2 +53,26 @@ for (var i = 1; i < arguments.length; i++) {

babelHelpers.inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
babelHelpers.possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
babelHelpers;

@@ -31,0 +79,0 @@

2

dist/fela-beautifier.min.js

@@ -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 t=e.renderToString.bind(e);return e.renderToString=function(){var e=t();return r(e,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=g;e>0;e-=1)x+=u.indent}function f(){x=b(x),R?x+=" {":(x+="\n",i(),x+="{"),"\n"!==s&&(x+="\n"),g+=1}function c(){var e;g-=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,g,y,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},g=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(y))x+=a,a===y&&(y=null),"\\"===a&&s===y&&(x+=s,A+=1);else if(o(a))x+=a,y=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,g>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,g>0&&(h=d.Block);continue}x+=a}else{if("}"===a){c(),h=d.Start,g>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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(o){return n(o,t.extends({},i,e))}};return f});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.FelaBeautifier=t()}(this,function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}function t(e,t){var n=e.renderToString.bind(e);return e.renderToString=function(){var e=n();return r(e,t)},e}var n={};n.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},n.classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n.createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),n.extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},n.inherits=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},n.possibleConstructorReturn=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t};var o=e(function(e,t){!function(){function o(e,t){function n(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=d;e>0;e-=1)v+=u.indent}function f(){v=S(v),x?v+=" {":(v+="\n",i(),v+="{"),"\n"!==s&&(v+="\n"),d+=1}function c(){var e;d-=1,v=S(v),v.length>0&&w&&(e=v.charAt(v.length-1),";"!==e&&"{"!==e&&(v+=";")),v+="\n",i(),v+="}",l.push(v),v=""}var u,l,a,s,p,h,y,d,b,g,S,m=0,A=e.length,v="",x=!0,w=!1;for(u=arguments.length>1?t:{},"undefined"==typeof u.indent&&(u.indent=" "),"string"==typeof u.openbrace&&(x="end-of-line"===u.openbrace),"boolean"==typeof u.autosemicolon&&(w=u.autosemicolon),S=String.prototype.trimRight?function(e){return e.trimRight()}:function(e){return e.replace(/\s+$/,"")},y={Start:0,AtRule:1,Block:2,Selector:3,Ruleset:4,Property:5,Separator:6,Expression:7,URL:8},d=0,h=y.Start,g=!1,l=[],e=e.replace(/\r\n/g,"\n");m<A;)if(a=e.charAt(m),s=e.charAt(m+1),m+=1,o(b))v+=a,a===b&&(b=null),"\\"===a&&s===b&&(v+=s,m+=1);else if(o(a))v+=a,b=a;else if(g)v+=a,"*"===a&&"/"===s&&(g=!1,v+=s,m+=1);else if("/"!==a||"*"!==s){if(h===y.Start){if(0===l.length&&n(a)&&0===v.length)continue;if(a<=" "||a.charCodeAt(0)>=128){h=y.Start,v+=a;continue}if(r(a)||"@"===a){if(p=S(v),0===p.length)l.length>0&&(v="\n\n");else if("}"===p.charAt(p.length-1)||";"===p.charAt(p.length-1))v=p+"\n\n";else for(;;){if(s=v.charAt(v.length-1)," "!==s&&9!==s.charCodeAt(0))break;v=v.substr(0,v.length-1)}v+=a,h="@"===a?y.AtRule:y.Selector;continue}}if(h!==y.AtRule)if(h!==y.Block)if(h!==y.Selector)if(h!==y.Ruleset)if(h!==y.Property)if(h!==y.Separator)if(h!==y.Expression)h===y.URL&&")"===a&&v.charAt(v.length-1!=="\\")?(v+=a,h=y.Expression):v+=a;else{if("}"===a){c(),h=y.Start,d>0&&(h=y.Block);continue}if(";"===a){v=S(v),v+=";\n",h=y.Ruleset;continue}if(v+=a,"("===a&&"l"===v.charAt(v.length-2)&&"r"===v.charAt(v.length-3)&&"u"===v.charAt(v.length-4)){h=y.URL;continue}}else{if(!n(a)){v+=a,h=y.Expression;continue}o(s)&&(h=y.Expression)}else{if(":"===a){v=S(v),v+=": ",h=y.Expression,n(s)&&(h=y.Separator);continue}if("}"===a){c(),h=y.Start,d>0&&(h=y.Block);continue}v+=a}else{if("}"===a){c(),h=y.Start,d>0&&(h=y.Block);continue}if("\n"===a){v=S(v),v+="\n";continue}if(!n(a)){v=S(v),v+="\n",i(),v+=a,h=y.Property;continue}v+=a}else{if("{"===a){f(),h=y.Ruleset;continue}if("}"===a){c(),h=y.Start;continue}v+=a}else{if(r(a)){if(p=S(v),0===p.length)l.length>0&&(v="\n\n");else if("}"===p.charAt(p.length-1))v=p+"\n\n";else for(;;){if(s=v.charAt(v.length-1)," "!==s&&9!==s.charCodeAt(0))break;v=v.substr(0,v.length-1)}i(),v+=a,h=y.Selector;continue}if("}"===a){c(),h=y.Start;continue}v+=a}else{if(";"===a){v+=a,h=y.Start;continue}if("{"===a){p=S(v),f(),h="@font-face"===p?y.Ruleset:y.Block;continue}v+=a}}else g=!0,v+=a,v+=s,m+=1;return v=l.join("")+v}"undefined"!=typeof t?e.exports=t=o:"object"===("undefined"==typeof window?"undefined":n.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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(o){return t(o,n.extends({},i,e))}};return f});
{
"name": "fela-beautifier",
"version": "3.0.5",
"version": "3.0.6",
"description": "Fela enhancer to beautify CSS output",

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

"peerDependencies": {
"fela": "3.0.5"
"fela": "3.0.6"
}
}
# fela-beautifier
<img alt="npm downloads" src="https://img.shields.io/npm/dm/fela-beautifier.svg">
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-1.51kb-brightgreen.svg">
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-1.88kb-brightgreen.svg">

@@ -16,5 +16,5 @@ The beautifier enhancer is a developer tool that automatically formats the rendered CSS markup on every change. It uses [cssbeautify](https://github.com/senchalabs/cssbeautify) to achieve this.

<!-- Fela (Development): Unminified version including all warnings -->
<script src="https://unpkg.com/fela-beautifier@3.0.5/dist/fela-beautifier.js"></script>
<script src="https://unpkg.com/fela-beautifier@3.0.6/dist/fela-beautifier.js"></script>
<!-- Fela (Production): Minified version -->
<script src="https://unpkg.com/fela-beautifier@3.0.5/dist/fela-beautifier.min.js"></script>
<script src="https://unpkg.com/fela-beautifier@3.0.6/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