1 | "use strict";
|
2 | var __importStar = (this && this.__importStar) || function (mod) {
|
3 | if (mod && mod.__esModule) return mod;
|
4 | var result = {};
|
5 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
6 | result["default"] = mod;
|
7 | return result;
|
8 | };
|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
10 | const _ = __importStar(require("lodash"));
|
11 | function selectorToQueryString(selector) {
|
12 | const v = [];
|
13 | _.forEach(selector, (value, label) => {
|
14 | if (typeof value === "string") {
|
15 | v.push(label + "=" + value);
|
16 | }
|
17 | else {
|
18 | v.push(label + " " + value.operator + " (" + value.values.join(",") + ")");
|
19 | }
|
20 | });
|
21 | return v.join(",");
|
22 | }
|
23 | exports.selectorToQueryString = selectorToQueryString;
|
24 |
|
\ | No newline at end of file |