css-safe

Make strings safe for CSS.

css-safe

Make string safe for CSS.

via npm:

$ npm install --save css-safe

Supports Node, AMD, browser global via UMD.

var cssSafe = require('css-safe');
 
var safe = cssSafe('Red, and blue.');
// 'red__002c-and-blue__0021'