@platforma-sdk/workflow-tengo 2.8.7 → 2.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tengo/lib/ll.lib.tengo +0 -1
- package/dist/tengo/lib/maps.lib.tengo +44 -0
- package/dist/tengo/tpl/exec.R.create-renv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.aggregate.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.map-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
- package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
- package/package.json +1 -1
|
@@ -101,6 +101,49 @@ return filter(map, func(k, v) { return predicateFnK(k) && predicateFnV(v) })
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
clone := func(obj, ...ops) {
|
|
111
|
+
removeUndefs := false
|
|
112
|
+
if len(ops) == 1 {
|
|
113
|
+
removeUndefs = ops[0].removeUndefs
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if is_map(obj) || ll.isStrict(obj) {
|
|
117
|
+
res := {}
|
|
118
|
+
strict := ll.isStrict(obj)
|
|
119
|
+
if strict {
|
|
120
|
+
obj = ll.fromStrict(obj)
|
|
121
|
+
}
|
|
122
|
+
for k, v in obj {
|
|
123
|
+
if !removeUndefs || !is_undefined(v) {
|
|
124
|
+
res[k] = clone(v, ops...)
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if strict {
|
|
128
|
+
return ll.toStrict(res)
|
|
129
|
+
} else {
|
|
130
|
+
return res
|
|
131
|
+
}
|
|
132
|
+
} else if is_array(obj) {
|
|
133
|
+
res := []
|
|
134
|
+
for v in obj {
|
|
135
|
+
res = append(res, clone(v, ops...))
|
|
136
|
+
}
|
|
137
|
+
return res
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return obj
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
104
147
|
merge := func(...maps) {
|
|
105
148
|
res := {}
|
|
106
149
|
for map in maps {
|
|
@@ -140,6 +183,7 @@ export ll.toStrict({
|
|
|
140
183
|
map : map,
|
|
141
184
|
merge: merge,
|
|
142
185
|
deepMerge: deepMerge,
|
|
186
|
+
clone: clone,
|
|
143
187
|
mapKeys : mapKeys,
|
|
144
188
|
mapValues : mapValues,
|
|
145
189
|
filter : filter,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|