1 | "use strict";
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports["default"] = void 0;
|
5 | function constructGradientValue(literals) {
|
6 | var template = '';
|
7 | for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
8 | substitutions[_key - 1] = arguments[_key];
|
9 | }
|
10 | for (var i = 0; i < literals.length; i += 1) {
|
11 | template += literals[i];
|
12 | if (i === substitutions.length - 1 && substitutions[i]) {
|
13 | var definedValues = substitutions.filter(function (substitute) {
|
14 | return !!substitute;
|
15 | });
|
16 |
|
17 | if (definedValues.length > 1) {
|
18 | template = template.slice(0, -1);
|
19 | template += ", " + substitutions[i];
|
20 |
|
21 | } else if (definedValues.length === 1) {
|
22 | template += "" + substitutions[i];
|
23 | }
|
24 | } else if (substitutions[i]) {
|
25 | template += substitutions[i] + " ";
|
26 | }
|
27 | }
|
28 | return template.trim();
|
29 | }
|
30 | var _default = exports["default"] = constructGradientValue;
|
31 | module.exports = exports.default; |
\ | No newline at end of file |