@platforma-sdk/workflow-tengo 2.15.13 → 2.15.15

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.
@@ -180,10 +180,39 @@ deepMerge = func(...maps) {
180
180
  return res
181
181
  }
182
182
 
183
+
184
+
185
+
186
+
187
+ deepTransform := undefined
188
+ deepTransform = func(...maps) {
189
+ res := {}
190
+ for map in maps {
191
+ for k, v in map {
192
+ if is_undefined(v) {
193
+ delete(res, k)
194
+ } else if is_callable(v) {
195
+ result := v(res[k])
196
+ if is_undefined(result) {
197
+ delete(res, k)
198
+ } else {
199
+ res[k] = result
200
+ }
201
+ } else if is_map(res[k]) && is_map(v) {
202
+ res[k] = deepTransform(res[k], v)
203
+ } else {
204
+ res[k] = v
205
+ }
206
+ }
207
+ }
208
+ return res
209
+ }
210
+
183
211
  export ll.toStrict({
184
212
  map : map,
185
213
  merge: merge,
186
214
  deepMerge: deepMerge,
215
+ deepTransform: deepTransform,
187
216
  clone: clone,
188
217
  mapKeys : mapKeys,
189
218
  mapValues : mapValues,
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/workflow-tengo",
3
- "version": "2.15.13",
3
+ "version": "2.15.15",
4
4
  "description": "Tengo SDK library",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",