Socket
Socket
Sign inDemoInstall

html-escaper

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 3.0.2

12

cjs/index.js

@@ -41,5 +41,6 @@ 'use strict';

* Safely escape HTML entities such as `&`, `<`, `>`, `"`, and `'`.
* @param {string|number|boolean} es the input to safely escape
* @returns {string} the escaped input, and it throws an error if
* the input type is unexpected
* @param {string} es the input to safely escape
* @returns {string} the escaped input, and it **throws** an error if
* the input type is unexpected, except for boolean and numbers,
* converted as string.
*/

@@ -69,6 +70,7 @@ const escape = es => replace.call(es, ca, pe);

* @param {string} un a previously escaped string
* @returns {string} the unescaped input, and it throws an error if
* the input type is unexpected
* @returns {string} the unescaped input, and it **throws** an error if
* the input type is unexpected, except for boolean and numbers,
* converted as string.
*/
const unescape = un => replace.call(un, es, cape);
exports.unescape = unescape;

@@ -40,5 +40,6 @@ /**

* Safely escape HTML entities such as `&`, `<`, `>`, `"`, and `'`.
* @param {string|number|boolean} es the input to safely escape
* @returns {string} the escaped input, and it throws an error if
* the input type is unexpected
* @param {string} es the input to safely escape
* @returns {string} the escaped input, and it **throws** an error if
* the input type is unexpected, except for boolean and numbers,
* converted as string.
*/

@@ -67,5 +68,6 @@ export const escape = es => replace.call(es, ca, pe);

* @param {string} un a previously escaped string
* @returns {string} the unescaped input, and it throws an error if
* the input type is unexpected
* @returns {string} the unescaped input, and it **throws** an error if
* the input type is unexpected, except for boolean and numbers,
* converted as string.
*/
export const unescape = un => replace.call(un, es, cape);

@@ -43,5 +43,6 @@ var html = (function (exports) {

* Safely escape HTML entities such as `&`, `<`, `>`, `"`, and `'`.
* @param {string|number|boolean} es the input to safely escape
* @returns {string} the escaped input, and it throws an error if
* the input type is unexpected
* @param {string} es the input to safely escape
* @returns {string} the escaped input, and it **throws** an error if
* the input type is unexpected, except for boolean and numbers,
* converted as string.
*/

@@ -70,4 +71,5 @@ const escape = es => replace.call(es, ca, pe);

* @param {string} un a previously escaped string
* @returns {string} the unescaped input, and it throws an error if
* the input type is unexpected
* @returns {string} the unescaped input, and it **throws** an error if
* the input type is unexpected, except for boolean and numbers,
* converted as string.
*/

@@ -74,0 +76,0 @@ const unescape = un => replace.call(un, es, cape);

{
"name": "html-escaper",
"version": "3.0.1",
"version": "3.0.2",
"description": "fast and safe way to escape and unescape &<>'\" chars",

@@ -5,0 +5,0 @@ "main": "./cjs/index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc