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 1.0.1 to 2.0.0

cjs/index.js

2

LICENSE.txt

@@ -1,2 +0,2 @@

Copyright (C) 2017 by Andrea Giammarchi - @WebReflection
Copyright (C) 2017-present by Andrea Giammarchi - @WebReflection

@@ -3,0 +3,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

@@ -1,2 +0,1 @@

/*! (c) Andrea Giammarchi - MIT */
var html=function(t){"use strict";var e=/[&<>'"]/g,r=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,n={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},u={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"'},c=function(t){return n[t]},a=function(t){return u[t]},o="".replace;return(t.freeze||t)({escape:function(t){return o.call(t,e,c)},unescape:function(t){return o.call(t,r,a)}})}(Object);try{module.exports=html}catch(t){}
var html=function(t){"use strict";var n="".replace,u=/[&<>'"]/g,r=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34);/g,a={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},e={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"'};function c(t){return a[t]}function o(t){return e[t]}return t.escape=function(t){return n.call(t,u,c)},t.unescape=function(t){return n.call(t,r,o)},t}({});
{
"name": "html-escaper",
"version": "1.0.1",
"version": "2.0.0",
"description": "fast and safe way to escape and unescape &<>'\" chars",
"main": "html.js",
"main": "cjs/index.js",
"module": "esm/index.js",
"unpkg": "min.js",
"scripts": {
"build": "npm run minify && npm test && npm run size",
"build": "npm run cjs && npm run rollup && npm run minify && npm test && npm run size",
"cjs": "ascjs esm cjs",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"minify": "uglifyjs html.js --comments=/^!/ --compress --mangle -o min.js",
"size": "cat html.js | wc -c;cat min.js | wc -c;gzip -c min.js | wc -c",
"minify": "uglifyjs index.js --comments=/^!/ --compress --mangle -o min.js",
"rollup": "rollup --config rollup.config.js",
"size": "cat index.js | wc -c;cat min.js | wc -c;gzip -c min.js | wc -c",
"test": "istanbul cover ./test.js"

@@ -32,6 +36,8 @@ },

"devDependencies": {
"coveralls": "^2.13.1",
"ascjs": "^3.0.1",
"coveralls": "^3.0.5",
"istanbul": "^0.4.5",
"uglify-js": "^3.0.15"
"rollup": "^1.17.0",
"uglify-js": "^3.6.0"
}
}
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