New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fela-statistics

Package Overview
Dependencies
Maintainers
2
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-statistics

Statistic generation tool for Fela

  • 12.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28
decreased by-54.84%
Maintainers
2
Weekly downloads
 
Created
Source

fela-statistics

npm version npm downloads Bundlephobia

Statistic generation tool for Fela. It collects several information and metrics to better analyze your application CSS.
Right now, it provides the following information:

  • Class count
    • per media query
    • with/without pseudo class
  • Usage per class
  • CSS file size
    • in bytes, kbytes, bytes (gzipped) and kbytes (gzipped)
  • Reuse
    • Reuse ratio (total used classes vs. total unique classes)
  • total classes with pseudo classes
  • total classes inside media queries
  • total renders
  • total used classes

Installation

yarn add fela-statistics

You may alternatively use npm i --save fela-statistics.

Usage

Adding the statistics enhancer will add a new function to the renderer called getStatistics.
You may call it at any given time, to get the current statistics object.

import { createRenderer } from 'fela'
import statistics from 'fela-statistics'

const renderer = createRenderer({
  enhancers: [ statistics() ]
})

// rendering stuff

const stats = renderer.getStatistics()
console.log(stats)

Example

License

Fela is licensed under the MIT License.
Documentation is licensed under Creative Commons License.
Created with ♥ by @robinweser and all the great contributors.

Keywords

FAQs

Package last updated on 16 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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