Neverending Perpetual Motion
Wondering what’s next for npm?Check out our public roadmap! »

email-comb

4.1.0 • Public • Published

email-comb

Remove unused CSS from email templates

Install

npm i email-comb

Quick Take

import { strict as assert } from "assert";
import { comb, defaults, version } from "email-comb";

// aptly named classes:
const source = `<head>
<style type="text/css">
.unused1[z] {a:1;}
.used[z] {a:2;}
</style>
</head>
<body class="  used  "><a class="used unused3">z</a>
</body>
`;

const intended = `<head>
<style type="text/css">
.used[z] {a:2;}
</style>
</head>
<body class="used"><a class="used">z</a>
</body>
`;

assert.equal(comb(source).result, intended);

Documentation

Please visit codsen.com for a full description of the API and examples.

Licence

MIT License

Copyright (c) 2010-2020 Roy Revelt and other contributors

ok codsen star

Install

npm i email-comb

DownloadsWeekly Downloads

7,850

Version

4.1.0

License

MIT

Unpacked Size

514 kB

Total Files

10

Last publish

Collaborators

  • avatar