-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RegExp pick #55
RegExp pick #55
Conversation
Cool, I like this. Thanks @tristaaan will check this out tonight. |
Could you update the Readme as well? |
@tristaaan you should update the jsdoc in |
Updated readme and jsdoc. It was missing some minor test cases too. (was assuming an array's elements were all of the same type, either regexp or string) |
|
||
function copyWithRegExp (from, to, regexp) { | ||
return function (key) { | ||
if (regexp.test(key) && !(key in to)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pick should always override to
(it should not work like 101/default
)
Thanks for the promptness. I am going to sleep on this one more night. I think I have some ideas on how to extend pick's functionality and I want to make sure what you've done here will play nice. Idea: Support key-mapping functionality by supplying a hash of keys to function (similar to what is mentioned here: #49 (comment)). |
refactoring regexp-pick
After thinking about this further I believe the RegExp functionality makes sense. Just waiting on moving Everything else here LGTM. 👍 |
add is-regexp function and tests
done |
Thanks! 💯 |
Published in v0.11.0 |
-t 100
to package.json to ensure 100% test coverage