( data: TransformData, matchedKeys: string[], keySelector: KeyRule, args: string | string[] | undefined )
| 353 | } |
| 354 | |
| 355 | function opSet( |
| 356 | data: TransformData, |
| 357 | matchedKeys: string[], |
| 358 | keySelector: KeyRule, |
| 359 | args: string | string[] | undefined |
| 360 | ) { |
| 361 | for (const key of matchedKeys) { |
| 362 | data[key] = args; |
| 363 | } |
| 364 | |
| 365 | // create new key from the selector if it's a simple string and no matched keys |
| 366 | if ( |
| 367 | matchedKeys.length === 0 && |
| 368 | typeof keySelector === 'string' && |
| 369 | data[keySelector] === undefined && |
| 370 | !isEmptyArgs(args) |
| 371 | ) { |
| 372 | data[keySelector] = args; |
| 373 | } |
| 374 | } |
| 375 | |
| 376 | function opAppend( |
| 377 | data: TransformData, |
no test coverage detected