Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
premailer-api
Advanced tools
A simple api wrapper for http://premailer.dialect.ca, a great tool for inlining css before you send an email.
node-premailer simplifies api integration by calling the Premailer API to inline css styles (and other options such as removing comments, classes and ids), then retrieving the generated html and text from their respective URLs before passing them to your callback.
npm install premailer-api
Or from source:
git clone git://github.com/JedWatson/node-premailer.git cd node-premailer npm link
var premailer = require('premailer-api');
var emailTemplate = '
<html>
<head>
<title>My Email</title>
<style type="text/css">
a { color: #336699; }
</style>
</head>
<body>
Styles inlined with
<a href="http://premailer.dialect.ca">Premailer</a> via
<a href="https://github.com/JedWatson/node-premailer">node-premailer</a>.
</body>
<html>';
premailer.prepare({html: emailTemplate }, function(err, email) {
res.send(email.html);
});
adapter
baseUrl
|| base_url
lineLength
|| line_length
linkQueryString
|| link_query_string
preserveStyles
|| preserve_styles
removeIds
|| remove_ids
removeClasses
|| remove_classes
removeComments
|| remove_comments
MIT Licensed. Copyright Jed Watson 2012.
A big thankyou to Dialect for Premailer, and for making the API freely available.
There's also a web version available here: http://premailer.dialect.ca
And you can check out the source code for Premailer itself here: https://github.com/alexdunae/premailer/
FAQs
Node wrapper for the Premailer API (premailer.dialect.ca/api)
The npm package premailer-api receives a total of 1,915 weekly downloads. As such, premailer-api popularity was classified as popular.
We found that premailer-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.