html-entities-not-email-friendly
TypeScript icon, indicating that this package has built-in type declarations

0.8.8 • Public • Published

html-entities-not-email-friendly

All HTML entities which are not email template friendly

page on codsen.com page on npm page on github Downloads per month changelog MIT Licence

Install

This package is pure ESM. If you're not ready yet, install an older version of this program, 0.5.0 (npm i html-entities-not-email-friendly@0.5.0).

npm i html-entities-not-email-friendly

Quick Take

import { strict as assert } from "assert";

import {
  notEmailFriendly,
  notEmailFriendlySetOnly,
  notEmailFriendlyLowercaseSetOnly,
  notEmailFriendlyMinLength,
  notEmailFriendlyMaxLength,
} from "html-entities-not-email-friendly";

// it's object, mapping entity names to numeric equivalents
assert.equal(Object.keys(notEmailFriendly).length, 1841);

// it's a Set, only listing the bad entity names
assert.equal(notEmailFriendlySetOnly.size, 1841);

// is ≳ email-friendly?
assert.equal(notEmailFriendlySetOnly.has("GreaterTilde"), true);
// no, use numeric entity

// is   email-friendly?
assert.equal(notEmailFriendlySetOnly.has("nbsp"), false);
// yes, it's OK

Documentation

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

Contributing

To report bugs or request features or assistance, raise an issue on GitHub.

Licence

MIT License.

Copyright © 2010-2024 Roy Revelt and other contributors.

ok codsen star

Package Sidebar

Install

npm i html-entities-not-email-friendly

Weekly Downloads

170

Version

0.8.8

License

MIT

Unpacked Size

141 kB

Total Files

7

Last publish

Collaborators

  • royston