
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
doiuse-email
Advanced tools
A tool for checking the HTML and CSS support of various email clients based on Can I email.
Inspired by the excellent doiuse library.
Install the package from npm using your favourite package manager:
npm install doiuse-email
Import it and run it by calling doIUseEmail(html: string, options: DoIUseOptions)
:
import { doIUseEmail } from 'doiuse-email';
const result = doIUseEmail(
`
<!doctype html>
<html>
<body>
<div style='background-color: orange'></div>
</body>
</html>
`,
{ emailClients: ['gmail.*'] }
);
console.log(result);
/*
{
"notes": [
"Note about `<body> element` support for `gmail.desktop-webmail`: Partial. Replaced by a `<div>` with supported attributes.",
"Note about `<body> element` support for `gmail.ios`: Partial. Replaced by a `<div>` with supported attributes.",
"Note about `<body> element` support for `gmail.android`: Partial. Replaced by a `<div>` with supported attributes.",
"Note about `<body> element` support for `gmail.mobile-webmail`: Partial. Replaced by a `<div>` with supported attributes.",
],
"success": true,
}
*/
// Output is based on https://caniemail.com
You can also call doiuse-email
from the CLI:
doiuse-email --email-clients='gmail.*' myfile.html
The command will output a JSON representing the support for the HTML in the provided file. It's recommended to use it with a tool like jq for more human-readable output:
doiuse-email --email-clients='gmail.*' myfile.html | jq
Type: string
The HTML that represents the email.
Type: string[]
An array of globs for matching email clients to be checked against the Can I Email database. For more information about the glob syntax that is used, refer to the micromatch package.
Possible email clients:
[
'apple-mail.macos',
'apple-mail.ios',
'gmail.desktop-webmail',
'gmail.ios',
'gmail.android',
'gmail.mobile-webmail',
'orange.desktop-webmail',
'orange.ios',
'orange.android',
'outlook.windows',
'outlook.windows-mail',
'outlook.macos',
'outlook.ios',
'outlook.android',
'yahoo.desktop-webmail',
'yahoo.ios',
'yahoo.android',
'aol.desktop-webmail',
'aol.ios',
'aol.android',
'samsung-email.android',
'sfr.desktop-webmail',
'sfr.ios',
'sfr.android',
'thunderbird.macos',
'protonmail.desktop-webmail',
'protonmail.ios',
'protonmail.android',
'hey.desktop-webmail',
'mail-ru.desktop-webmail',
'fastmail.desktop-webmail',
'laposte.desktop-webmail'
];
Example: ["gmail.*", "*.desktop-webmail"]
FAQs
Lint CSS for email support against caniemail database.
The npm package doiuse-email receives a total of 52 weekly downloads. As such, doiuse-email popularity was classified as not popular.
We found that doiuse-email 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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.