Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
danrevah committed Mar 13, 2017
1 parent 80e1dff commit 1cd3034
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/app/pipes/object/invert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export class InvertPipe implements PipeTransform {
}

return Object.keys(obj)
.reduce((o, k) => Object.assign(o, {[obj[k]]: k}), {});
.reduce((o, k) => {
return Object.assign(o, {[obj[k]]: k})
}, {});
}
}
4 changes: 3 additions & 1 deletion src/app/pipes/object/omit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export class OmitPipe implements PipeTransform {

return Object.keys(obj)
.filter(k => !~args.indexOf(k))
.reduce((o, k) => Object.assign(o, {[k]: obj[k]}), {});
.reduce((o, k) => {
return Object.assign(o, {[k]: obj[k]});
}, {});
}
}
4 changes: 3 additions & 1 deletion src/app/pipes/object/pick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export class PickPipe implements PipeTransform {
return obj;
}

return args.reduce((o, k) => Object.assign(o, {[k]: obj[k]}), {});
return args.reduce((o, k) => {
return Object.assign(o, {[k]: obj[k]});
}, {});
}
}

0 comments on commit 1cd3034

Please sign in to comment.