Browse Source

Merge pull request #935 from uristdwarf/patch-3

pick-omit: grammar
content-update
MSilva95 2 years ago committed by GitHub
parent
commit
759dea9592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      subjects/pick-omit/README.md

8
subjects/pick-omit/README.md

@ -2,11 +2,11 @@
### Instructions
Create a `pick` function that takes an object and keys.
This function create a new object that pick only the keys, in the second argument, from the object passed as argument.
Create a `pick` function that takes an object and a string or array of strings.
This function returns a new object that contains only the key/value pairs, whose key matches with the string or a string in the array, from the object passed as an argument.
Create a `omit` function that takes an object and keys.
This function create a new object that omit only the keys, in the second argument, from the object passed as argument.
Create a `omit` function that takes an object and a string or array of strings.
This function returns a new object that contains only the key/value pairs, whose key doesn't match with the string or a single string in the array, from the object passed as an argument.
> Those functions are pure and must not modify the given object

Loading…
Cancel
Save