Socket
Book a DemoInstallSign in
Socket

css-dedoupe

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

css-dedoupe

Remove duplicate properties and declarations from your CSS

unpublished
Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
22
-82.4%
Maintainers
1
Weekly downloads
 
Created
Source

css-dedoupe

Remove duplicate properties and declarations from your CSS

Package version Downloads Standard Travis Build Standard Readme GitHub version Dependency CI License PRs Donate


Built with ❤︎ by Tiaan and contributors

Table of Contents

Table of Contents
  • About
  • Install
  • Usage
  • CLI
  • Issues
  • Contribute
  • License
  • About

    This is a basic module that walks a AST built with reworkcss and removes duplicate CSS properties associated with a specific selector. Only keeping the most recent.

    Install

    $ npm install --save css-dedoupe
    # OR
    $ yarn add css-dedoupe
    

    Usage

    const cssDedoupe = require('css-dedoupe')
    
    const cssStr = '.float-right {float: right;}.float-right {float: right;}'
    console.log(cssDedoupe(cssStr)) // '.float-right{float:right}'
    
    

    CLI

    $ css-dedoupe input.css output.css
    

    Or if you would like to modify the input file directly:

    $ css-dedoupe inputAndOutput.css
    

    Issues

    • Currently only supports to level declartions e.g. does not dedoupe declartions in media queries.
    • The module makes no attempt to format the css after dedouping. Use modules like csscomb for this.

    Contribute

    Contributions are welcome. Please open up an issue or create PR if you would like to help out.

    Note: If editing the README, please conform to the standard-readme specification.

    License

    Licensed under the MIT License.

    Icons made by Madebyoliver from www.flaticon.com is licensed by CC 3.0 BY

    Keywords

    css

    FAQs

    Package last updated on 24 Nov 2025

    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