mirror of https://github.com/01-edu/public.git
482 B
482 B
Pick Omit
Instructions
Create two functions which takes an object and a string or array of strings. They should return a new object which:
pick
: contains only those keys which appear in the string or array of strings.omit
: contains only those keys which do not match the string, or do not appear in the array of strings.
Those functions are pure and must not modify the given object