shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
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
- css*-String
The css code to process
- settings{}Object
An object of settings
Return
- -String
The processed css code
Example
import { stripCssComments } from '@blackbyte/sugar/css';
stripCssComments(`
// something cool
body { background-color: red; }
`);
// body { background-color: red }Settings
- blocktrueBoolean
Remove the blocks comments
- linetrueBoolean
Remove the line comments
Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space