stripCssComments

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.css

This function simply remove all the css comments like:

  • Multiline blocks css comments begining with / *, ending with /
  • Single line comments begining with //

Params

  1. css*-String

    The css code to process

  2. settings{}Object

    An object of settings

Return

  1. -String

    The processed css code

Example

import { stripCssComments } from '@blackbyte/sugar/css';
stripCssComments(`
// something cool
body { background-color: red; }
`);
// body { background-color: red }

Settings

  1. blocktrueBoolean

    Remove the blocks comments

  2. linetrueBoolean

    Remove the line comments

Todo

  • testsnormal