Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

escape-html-template-tag

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

escape-html-template-tag - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

4

CHANGELOG.md

@@ -7,1 +7,5 @@ # Changelog

- build with microbundle
## 2.0.1 - 2.0.4
- Fix export style for require in node.js

@@ -1,1 +0,7 @@

export { default } from './index';
import escapeHtml, { join, safe } from './index';
declare const _default: typeof escapeHtml & {
default: typeof escapeHtml;
join: typeof join;
safe: typeof safe;
};
export default _default;

8

dist/index.d.ts

@@ -11,7 +11,3 @@ export declare function join(array: any, separator: any): HtmlSafeString;

}
declare function escapeHtml(parts: any, ...subs: any[]): HtmlSafeString;
declare const _default: typeof escapeHtml & {
join: typeof join;
safe: typeof safe;
};
export default _default;
export default function escapeHtml(parts: any, ...subs: any[]): HtmlSafeString;
export {};

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

var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},t=new RegExp(Object.keys(n).join("|"),"g");function r(n,t){return null==t&&(t=","),n.length<=0?new e([""],[]):new e([""].concat(Array(n.length-1).fill(t),[""]),n)}var e=function(){function e(n,t){this._parts=n,this._subs=t}var i=e.prototype;return i._escapeHtml=function(i){return i instanceof e?i:Array.isArray(i)?r(i,""):String(i).replace(t,function(t){return n[t]})},i.toString=function(){var n=this;return this._parts.reduce(function(t,r,e){return t+n._escapeHtml(n._subs[e-1])+r})},i.inspect=function(){return this.constructor.name+" '"+this.toString()+"'"},e}(),i=Object.assign(function(n){return new e(n,[].slice.call(arguments,1))},{join:r,safe:function(n){return new e([String(n)],[])}});module.exports=i;
var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},n=new RegExp(Object.keys(t).join("|"),"g");function r(t,n){return null==n&&(n=","),t.length<=0?new e([""],[]):new e([""].concat(Array(t.length-1).fill(n),[""]),t)}var e=function(){function e(t,n){this._parts=t,this._subs=n}var i=e.prototype;return i._escapeHtml=function(i){return i instanceof e?i:Array.isArray(i)?r(i,""):String(i).replace(n,function(n){return t[n]})},i.toString=function(){var t=this;return this._parts.reduce(function(n,r,e){return n+t._escapeHtml(t._subs[e-1])+r})},i.inspect=function(){return this.constructor.name+" '"+this.toString()+"'"},e}();function i(t){return new e(t,[].slice.call(arguments,1))}var u=Object.assign(i,{default:i,join:r,safe:function(t){return new e([String(t)],[])}});module.exports=u;
//# sourceMappingURL=index.js.map

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

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n||self).escapeHtmlTemplateTag=t()}(this,function(){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},t=new RegExp(Object.keys(n).join("|"),"g");function e(n,t){return null==t&&(t=","),n.length<=0?new r([""],[]):new r([""].concat(Array(n.length-1).fill(t),[""]),n)}var r=function(){function r(n,t){this._parts=n,this._subs=t}var i=r.prototype;return i._escapeHtml=function(i){return i instanceof r?i:Array.isArray(i)?e(i,""):String(i).replace(t,function(t){return n[t]})},i.toString=function(){var n=this;return this._parts.reduce(function(t,e,r){return t+n._escapeHtml(n._subs[r-1])+e})},i.inspect=function(){return this.constructor.name+" '"+this.toString()+"'"},r}();return Object.assign(function(n){return new r(n,[].slice.call(arguments,1))},{join:e,safe:function(n){return new r([String(n)],[])}})});
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n||self).escapeHtmlTemplateTag=t()}(this,function(){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},t=new RegExp(Object.keys(n).join("|"),"g");function e(n,t){return null==t&&(t=","),n.length<=0?new r([""],[]):new r([""].concat(Array(n.length-1).fill(t),[""]),n)}var r=function(){function r(n,t){this._parts=n,this._subs=t}var i=r.prototype;return i._escapeHtml=function(i){return i instanceof r?i:Array.isArray(i)?e(i,""):String(i).replace(t,function(t){return n[t]})},i.toString=function(){var n=this;return this._parts.reduce(function(t,e,r){return t+n._escapeHtml(n._subs[r-1])+e})},i.inspect=function(){return this.constructor.name+" '"+this.toString()+"'"},r}();function i(n){return new r(n,[].slice.call(arguments,1))}return Object.assign(i,{default:i,join:e,safe:function(n){return new r([String(n)],[])}})});
//# sourceMappingURL=index.umd.js.map
{
"name": "escape-html-template-tag",
"version": "2.0.3",
"version": "2.0.4",
"description": "Tag literal strings with this function to html escape interpolated values",

@@ -5,0 +5,0 @@ "source": "src/index.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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