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.0.10 to 1.1.0

2

index.min.js

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

export default function(e,t={}){const n=Object.keys(t),u=Object.values(t);return new Function(...n,`return \`${e}\`;`)(...u)}
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)}}
{
"name": "interpolate-es",
"version": "1.0.10",
"version": "1.1.0",
"description": "Dynamically build tagged templates",

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

@@ -12,3 +12,11 @@ /* eslint-disable no-new-func */

const values = Object.values(tags);
return new Function(...keys, `return \`${template}\`;`)(...values);
try {
return new Function(...keys, `return \`${template}\`;`)(...values);
} catch (e) {
console.group('Template Error:');
console.error(tags);
console.error(template);
console.groupEnd();
throw Error(e);
}
}

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