source: trip-planner-front/node_modules/@babel/template/lib/string.js@ 84d0fbb

Last change on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 565 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = stringTemplate;
7
8var _options = require("./options");
9
10var _parse = require("./parse");
11
12var _populate = require("./populate");
13
14function stringTemplate(formatter, code, opts) {
15 code = formatter.code(code);
16 let metadata;
17 return arg => {
18 const replacements = (0, _options.normalizeReplacements)(arg);
19 if (!metadata) metadata = (0, _parse.default)(formatter, code, opts);
20 return formatter.unwrap((0, _populate.default)(metadata, replacements));
21 };
22}
Note: See TracBrowser for help on using the repository browser.