@babel/template
Advanced tools
Comparing version 7.0.0-beta.5 to 7.0.0-beta.31
@@ -14,4 +14,2 @@ "use strict"; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var NO_PLACEHOLDER = (0, _options.validate)({ | ||
@@ -42,3 +40,3 @@ placeholderPattern: false | ||
return extendedTrace(builder(args)); | ||
} else if (_typeof(tpl) === "object" && tpl) { | ||
} else if (typeof tpl === "object" && tpl) { | ||
if (args.length > 0) throw new Error("Unexpected extra params."); | ||
@@ -48,3 +46,3 @@ return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl))); | ||
throw new Error("Unexpected template param " + _typeof(tpl)); | ||
throw new Error("Unexpected template param " + typeof tpl); | ||
}, { | ||
@@ -70,3 +68,3 @@ ast: function ast(tpl) { | ||
throw new Error("Unexpected template param " + _typeof(tpl)); | ||
throw new Error("Unexpected template param " + typeof tpl); | ||
} | ||
@@ -73,0 +71,0 @@ }); |
@@ -10,4 +10,2 @@ "use strict"; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function merge(a, b) { | ||
@@ -29,3 +27,3 @@ var _b$placeholderWhiteli = b.placeholderWhitelist, | ||
function validate(opts) { | ||
if (opts != null && _typeof(opts) !== "object") { | ||
if (opts != null && typeof opts !== "object") { | ||
throw new Error("Unknown template options."); | ||
@@ -66,3 +64,3 @@ } | ||
}, {}); | ||
} else if (_typeof(replacements) === "object" || replacements == null) { | ||
} else if (typeof replacements === "object" || replacements == null) { | ||
return replacements || undefined; | ||
@@ -69,0 +67,0 @@ } |
@@ -10,4 +10,2 @@ "use strict"; | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function populatePlaceholders(metadata, replacements) { | ||
@@ -46,3 +44,3 @@ var ast = t.cloneDeep(metadata.ast); | ||
}); | ||
} else if (_typeof(replacement) === "object") { | ||
} else if (typeof replacement === "object") { | ||
replacement = t.cloneDeep(replacement); | ||
@@ -49,0 +47,0 @@ } |
{ | ||
"name": "@babel/template", | ||
"version": "7.0.0-beta.5", | ||
"version": "7.0.0-beta.31", | ||
"description": "Generate an AST from a string template.", | ||
@@ -11,7 +11,7 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
"dependencies": { | ||
"@babel/code-frame": "7.0.0-beta.5", | ||
"@babel/types": "7.0.0-beta.5", | ||
"babylon": "7.0.0-beta.30", | ||
"@babel/code-frame": "7.0.0-beta.31", | ||
"@babel/types": "7.0.0-beta.31", | ||
"babylon": "7.0.0-beta.31", | ||
"lodash": "^4.2.0" | ||
} | ||
} |
23992
507
+ Added@babel/code-frame@7.0.0-beta.31(transitive)
+ Added@babel/types@7.0.0-beta.31(transitive)
+ Addedbabylon@7.0.0-beta.31(transitive)
- Removed@babel/code-frame@7.0.0-beta.5(transitive)
- Removed@babel/types@7.0.0-beta.5(transitive)
- Removedbabylon@7.0.0-beta.30(transitive)
Updated@babel/types@7.0.0-beta.31
Updatedbabylon@7.0.0-beta.31