npm.io
1.0.1 • Published 8 years ago

eyeliner

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0
Stars
4
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

node-eyeliner

Native bindings for eyeliner, a CSS inliner for making emails.

Example

import eyeliner from 'eyeliner';

const html = `
  <!doctype html>
  <html>
    <head>
      <style>
        .red {
          color: red;
        }
      </style>
    </head>
    <body>
      <h1 class="red">This is red</h1>
    </body>
  </html>
`;

const inlinedHtml = eyeliner({ html });

console.log(inlinedHtml);
// <!DOCTYPE html><html><head>
//
//       <style></style></head>
//       <body>
//         <h1 class="red" style="color: red;">This is red</h1>
//
//
//   </body></html>

Benchmarks

eyeliner is ultra fast like 3x faster than the competition. Check the benchmark directory to see the comparisons.