html-escaper
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -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={"&":"&","<":"<",">":">","'":"'",'"':"""},u={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'},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={"&":"&","<":"<",">":">","'":"'",'"':"""},e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'};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" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12585
7
174
5
1