1 | import * as AWS from 'aws-sdk';
|
2 | import {IResponse, response} from './tools';
|
3 |
|
4 | AWS.config.update({region: 'us-east-1'});
|
5 |
|
6 |
|
7 |
|
8 | export class ToolsUtils {
|
9 |
|
10 |
|
11 | constructor() {
|
12 |
|
13 | }
|
14 |
|
15 | public async removeEmptyStringElements(obj) {
|
16 | try {
|
17 | for (let prop in obj) {
|
18 | if (typeof obj[prop] === 'object') {
|
19 | await this.removeEmptyStringElements(obj[prop]);
|
20 | } else if (obj[prop] === '') {
|
21 | delete obj[prop];
|
22 | }
|
23 | }
|
24 | return obj;
|
25 | } catch (error) {
|
26 |
|
27 | }
|
28 | }
|
29 | } |
\ | No newline at end of file |