test/dummy/node_modules/@babel/template/lib/literal.js in disco_app-0.18.1 vs test/dummy/node_modules/@babel/template/lib/literal.js in disco_app-0.18.2

- old
+ new

@@ -5,23 +5,25 @@ }); exports.default = literalTemplate; var _options = require("./options"); -var _parse = require("./parse"); +var _parse = _interopRequireDefault(require("./parse")); -var _populate = require("./populate"); +var _populate = _interopRequireDefault(require("./populate")); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function literalTemplate(formatter, tpl, opts) { const { metadata, names } = buildLiteralData(formatter, tpl, opts); return arg => { - const defaultReplacements = {}; - arg.forEach((replacement, i) => { - defaultReplacements[names[i]] = replacement; - }); + const defaultReplacements = arg.reduce((acc, replacement, i) => { + acc[names[i]] = replacement; + return acc; + }, {}); return arg => { const replacements = (0, _options.normalizeReplacements)(arg); if (replacements) { Object.keys(replacements).forEach(key => { \ No newline at end of file