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

interpolate-es

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interpolate-es - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

2

index.min.js

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

export default function(r,o={}){const e=Object.keys(o),n=Object.values(o);try{return new Function(...e,`return \`${r}\`;`)(...n)}catch(e){throw console.group("Template Error:"),console.error(o),console.error(r),console.groupEnd(),Error(e)}}
class e extends Error{constructor(e,t,n){super(),this.name="TemplateError";let r="\n------------------\n";r+=`Template: \`${e}\``,r+="\n------------------\n",r+=`Tags: ${JSON.stringify(t,null,2)}`,r+="\n------------------\n",r+=n,this.message=r}}export default function(t,n={}){const r=Object.keys(n),s=Object.values(n);try{return new Function(...r,`return \`${t}\`;`)(...s)}catch(r){throw new e(t,n,r)}}
{
"name": "interpolate-es",
"version": "1.1.1",
"version": "1.2.0",
"description": "Dynamically build tagged templates",

@@ -5,0 +5,0 @@ "keywords": [

@@ -15,8 +15,18 @@ /* eslint-disable no-new-func */

} catch (e) {
console.group('Template Error:');
console.error(tags);
console.error(template);
console.groupEnd();
throw Error(e);
throw new TemplateException(template, tags, e);
}
}
class TemplateException extends Error {
constructor (template, tags, message) {
super();
this.name = 'TemplateError';
let msg = '\n------------------\n';
msg += `Template: \`${template}\``;
msg += '\n------------------\n';
msg += `Tags: ${JSON.stringify(tags, null, 2)}`;
msg += '\n------------------\n';
msg += message;
this.message = msg;
}
}

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