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 5.0.7 to 5.0.8

14

es/index.js
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
import cssbeautify from 'cssbeautify';
import { objectReduce } from 'fela-utils';
import { objectReduce, objectEach } from 'fela-utils';
function addBeautifier(renderer, options) {
renderer.subscribe(function () {
renderer.fontFaces = cssbeautify(renderer.fontFaces, options);
renderer.keyframes = cssbeautify(renderer.keyframes, options);
renderer.statics = cssbeautify(renderer.statics, options);
renderer.rules = cssbeautify(renderer.rules, options);
renderer.mediaRules = objectReduce(renderer.mediaRules, function (mediaRules, rules, query) {
mediaRules[query] = cssbeautify(rules, options);
return mediaRules;
}, {});
return objectEach(renderer.styleNodes, function (node, key) {
node.textContent = cssbeautify(node.textContent, options);
});
});

@@ -18,0 +12,0 @@

@@ -21,11 +21,5 @@ 'use strict';

renderer.subscribe(function () {
renderer.fontFaces = (0, _cssbeautify2.default)(renderer.fontFaces, options);
renderer.keyframes = (0, _cssbeautify2.default)(renderer.keyframes, options);
renderer.statics = (0, _cssbeautify2.default)(renderer.statics, options);
renderer.rules = (0, _cssbeautify2.default)(renderer.rules, options);
renderer.mediaRules = (0, _felaUtils.objectReduce)(renderer.mediaRules, function (mediaRules, rules, query) {
mediaRules[query] = (0, _cssbeautify2.default)(rules, options);
return mediaRules;
}, {});
return (0, _felaUtils.objectEach)(renderer.styleNodes, function (node, key) {
node.textContent = (0, _cssbeautify2.default)(node.textContent, options);
});
});

@@ -32,0 +26,0 @@

{
"name": "fela-beautifier",
"version": "5.0.7",
"version": "5.0.8",
"description": "Fela enhancer to beautify CSS output",

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

"cssbeautify": "^0.3.1",
"fela-utils": "^6.0.1"
"fela-utils": "^7.0.0"
}
}
# 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.91kb-brightgreen.svg">
<img alt="npm version" src="https://badge.fury.io/js/fela-beautifier.svg"> <img alt="npm downloads" src="https://img.shields.io/npm/dm/fela-beautifier.svg">

@@ -5,0 +5,0 @@ 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.

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