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.13 to 5.0.14

18

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, objectEach } from 'fela-utils';
import forEach from 'lodash/forEach';
function addBeautifier(renderer, options) {
renderer.subscribe(function () {
return objectEach(renderer.nodes, function (node, key) {
node.textContent = cssbeautify(node.textContent, options);
function beautify() {
forEach(renderer.nodes, function (node, key) {
var beautifiedContent = cssbeautify(node.textContent, options);
if (node.textContent !== beautifiedContent) {
node.textContent = beautifiedContent;
}
});
});
setTimeout(beautify, 200);
}
beautify();
return renderer;

@@ -14,0 +22,0 @@ }

@@ -15,13 +15,23 @@ 'use strict';

var _felaUtils = require('fela-utils');
var _forEach = require('lodash/forEach');
var _forEach2 = _interopRequireDefault(_forEach);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function addBeautifier(renderer, options) {
renderer.subscribe(function () {
return (0, _felaUtils.objectEach)(renderer.nodes, function (node, key) {
node.textContent = (0, _cssbeautify2.default)(node.textContent, options);
function beautify() {
(0, _forEach2.default)(renderer.nodes, function (node, key) {
var beautifiedContent = (0, _cssbeautify2.default)(node.textContent, options);
if (node.textContent !== beautifiedContent) {
node.textContent = beautifiedContent;
}
});
});
setTimeout(beautify, 200);
}
beautify();
return renderer;

@@ -28,0 +38,0 @@ }

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

@@ -28,5 +28,5 @@ "main": "lib/index.js",

"dependencies": {
"cssbeautify": "0.3.1",
"fela-utils": "^7.0.5"
"cssbeautify": "^0.3.1",
"lodash": "^4.17.4"
}
}
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