Last change
on this file since fa375fe 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 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = stringTemplate;
|
---|
7 |
|
---|
8 | var _options = require("./options");
|
---|
9 |
|
---|
10 | var _parse = require("./parse");
|
---|
11 |
|
---|
12 | var _populate = require("./populate");
|
---|
13 |
|
---|
14 | function 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.