Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const removeEmptyKeysUtil = (payload: any): any => {
- Object.keys(payload).map(
- (key): any => {
- if (payload && payload[key] === '') {
- delete payload[key];
- }
- return false;
- }
- );
- return payload;
- };
- export default removeEmptyKeysUtil;
- if (payload && payload[key] === '') {
- const {delete payload[key], ...actualPayload} = payload;
- }
- return false;
- I know, I can disable the rule, but I do not want to do that. I want to properly code that branch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement