@babel/plugin-transform-template-literals
Advanced tools
Comparing version 7.0.0-beta.47 to 7.0.0-beta.48
@@ -11,3 +11,3 @@ "use strict"; | ||
_helperPluginUtils = function _helperPluginUtils() { | ||
_helperPluginUtils = function () { | ||
return data; | ||
@@ -22,3 +22,3 @@ }; | ||
_core = function _core() { | ||
_core = function () { | ||
return data; | ||
@@ -32,3 +32,5 @@ }; | ||
api.assertVersion(7); | ||
const loose = options.loose; | ||
const { | ||
loose | ||
} = options; | ||
let helperName = "taggedTemplateLiteral"; | ||
@@ -59,14 +61,17 @@ if (loose) helperName += "Loose"; | ||
TaggedTemplateExpression(path) { | ||
const node = path.node; | ||
const quasi = node.quasi; | ||
const { | ||
node | ||
} = path; | ||
const { | ||
quasi | ||
} = node; | ||
const strings = []; | ||
const raws = []; | ||
let isStringsRawEqual = true; | ||
var _arr = quasi.quasis; | ||
for (var _i = 0; _i < _arr.length; _i++) { | ||
const elem = _arr[_i]; | ||
const _elem$value = elem.value, | ||
raw = _elem$value.raw, | ||
cooked = _elem$value.cooked; | ||
for (const elem of quasi.quasis) { | ||
const { | ||
raw, | ||
cooked | ||
} = elem.value; | ||
const value = cooked == null ? path.scope.buildUndefinedNode() : _core().types.stringLiteral(cooked); | ||
@@ -105,7 +110,4 @@ strings.push(value); | ||
let index = 0; | ||
var _arr2 = path.node.quasis; | ||
for (var _i2 = 0; _i2 < _arr2.length; _i2++) { | ||
const elem = _arr2[_i2]; | ||
for (const elem of path.node.quasis) { | ||
if (elem.value.cooked) { | ||
@@ -112,0 +114,0 @@ nodes.push(_core().types.stringLiteral(elem.value.cooked)); |
{ | ||
"name": "@babel/plugin-transform-template-literals", | ||
"version": "7.0.0-beta.47", | ||
"version": "7.0.0-beta.48", | ||
"description": "Compile ES2015 template literals to ES5", | ||
@@ -9,4 +9,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-template-literals", | ||
"dependencies": { | ||
"@babel/helper-annotate-as-pure": "7.0.0-beta.47", | ||
"@babel/helper-plugin-utils": "7.0.0-beta.47" | ||
"@babel/helper-annotate-as-pure": "7.0.0-beta.48", | ||
"@babel/helper-plugin-utils": "7.0.0-beta.48" | ||
}, | ||
@@ -17,8 +17,8 @@ "keywords": [ | ||
"peerDependencies": { | ||
"@babel/core": "7.0.0-beta.47" | ||
"@babel/core": "7.0.0-beta.48" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.47", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.47" | ||
"@babel/core": "7.0.0-beta.48", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.48" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117
6003
+ Added@babel/code-frame@7.0.0-beta.48(transitive)
+ Added@babel/core@7.0.0-beta.48(transitive)
+ Added@babel/generator@7.0.0-beta.48(transitive)
+ Added@babel/helper-annotate-as-pure@7.0.0-beta.48(transitive)
+ Added@babel/helper-function-name@7.0.0-beta.48(transitive)
+ Added@babel/helper-get-function-arity@7.0.0-beta.48(transitive)
+ Added@babel/helper-plugin-utils@7.0.0-beta.48(transitive)
+ Added@babel/helper-split-export-declaration@7.0.0-beta.48(transitive)
+ Added@babel/helpers@7.0.0-beta.48(transitive)
+ Added@babel/highlight@7.0.0-beta.48(transitive)
+ Added@babel/parser@7.0.0-beta.48(transitive)
+ Added@babel/template@7.0.0-beta.48(transitive)
+ Added@babel/traverse@7.0.0-beta.48(transitive)
+ Added@babel/types@7.0.0-beta.48(transitive)
- Removed@babel/code-frame@7.0.0-beta.47(transitive)
- Removed@babel/core@7.0.0-beta.47(transitive)
- Removed@babel/generator@7.0.0-beta.47(transitive)
- Removed@babel/helper-annotate-as-pure@7.0.0-beta.47(transitive)
- Removed@babel/helper-function-name@7.0.0-beta.47(transitive)
- Removed@babel/helper-get-function-arity@7.0.0-beta.47(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.47(transitive)
- Removed@babel/helper-split-export-declaration@7.0.0-beta.47(transitive)
- Removed@babel/helpers@7.0.0-beta.47(transitive)
- Removed@babel/highlight@7.0.0-beta.47(transitive)
- Removed@babel/template@7.0.0-beta.47(transitive)
- Removed@babel/traverse@7.0.0-beta.47(transitive)
- Removed@babel/types@7.0.0-beta.47(transitive)
- Removedbabylon@7.0.0-beta.47(transitive)