Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-template-literals

Package Overview
Dependencies
Maintainers
6
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-template-literals - npm Package Compare versions

Comparing version 7.12.13 to 7.13.0

15

lib/index.js

@@ -13,8 +13,9 @@ "use strict";

var _default = (0, _helperPluginUtils.declare)((api, options) => {
var _api$assumption, _api$assumption2;
api.assertVersion(7);
const {
loose
} = options;
const ignoreToPrimitiveHint = (_api$assumption = api.assumption("ignoreToPrimitiveHint")) != null ? _api$assumption : options.loose;
const mutableTemplateObject = (_api$assumption2 = api.assumption("mutableTemplateObject")) != null ? _api$assumption2 : options.loose;
let helperName = "taggedTemplateLiteral";
if (loose) helperName += "Loose";
if (mutableTemplateObject) helperName += "Loose";

@@ -107,5 +108,3 @@ function buildConcatCallExpressions(items) {

const considerSecondNode = !loose || !_core.types.isStringLiteral(nodes[1]);
if (!_core.types.isStringLiteral(nodes[0]) && considerSecondNode) {
if (!_core.types.isStringLiteral(nodes[0]) && !(ignoreToPrimitiveHint && _core.types.isStringLiteral(nodes[1]))) {
nodes.unshift(_core.types.stringLiteral(""));

@@ -116,3 +115,3 @@ }

if (loose) {
if (ignoreToPrimitiveHint) {
for (let i = 1; i < nodes.length; i++) {

@@ -119,0 +118,0 @@ root = _core.types.binaryExpression("+", root, nodes[i]);

{
"name": "@babel/plugin-transform-template-literals",
"version": "7.12.13",
"version": "7.13.0",
"description": "Compile ES2015 template literals to ES5",

@@ -16,3 +16,3 @@ "repository": {

"dependencies": {
"@babel/helper-plugin-utils": "^7.12.13"
"@babel/helper-plugin-utils": "^7.13.0"
},

@@ -26,3 +26,3 @@ "keywords": [

"devDependencies": {
"@babel/core": "7.12.13",
"@babel/core": "7.13.0",
"@babel/helper-plugin-test-runner": "7.12.13"

@@ -29,0 +29,0 @@ },

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