New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html-es6cape

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-es6cape

Escape HTML special characters (including `)

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
decreased by-32.92%
Maintainers
1
Weekly downloads
 
Created
Source

html-es6cape

version Travis Codecov issues downloads license

Escape HTML special characters (including `).

Please note the pun in the package name! :zap:

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."!

Keywords

FAQs

Package last updated on 05 Dec 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc