JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5455
  • Score
    100M100P100Q130152F
  • License MIT

Escape HTML special characters (including `)

Package Exports

  • html-es6cape

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (html-es6cape) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

html-es6cape

version Travis Codecov issues downloads license

Escape HTML special characters (including `).

Please note the pun in the package name! ⚡

Installation

This package is distributed via npm:

npm install html-es6cape

- or -

Download the file src/index.js and add it to your ES6 project.

Usage

var htmlEscape = require("html-es6cape");

var unescapedString = `This is an evil unescaped string <"'&'">! #whoopwhoop`;
var escapedString = htmlEscape(unescapedString);
// "This is a nice escaped String &lt;&quot;&#39;&amp;&#39;&quot;&gt;! #whoopwhoop"

- or -

import htmlEscape from "html-es6cape";

var unescapedString = `This is an evil unescaped string <"'&'">! #whoopwhoop`;
var escapedString = htmlEscape(unescapedString);
// "This is a nice escaped String &lt;&quot;&#39;&amp;&#39;&quot;&gt;! #whoopwhoop"

License

MIT

Thanks

Special thanks to my family, my friends, my bae ... and Kent C. Dodds for his series "How to Write a JavaScript Library."!