-
-
Notifications
You must be signed in to change notification settings - Fork 7
Accept predicate function or array of types as type parameter #1
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
Conversation
index.js
Outdated
| return typeof value === type; | ||
| } | ||
| if (typeof type === 'function') { | ||
| return Boolean(type(value)); |
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.
prefer !!type(value) to covert to boolean
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.
Sure.
|
A few comments |
|
I found a missed case that wasn't handled. Adding tests and fix now that I'll land in the merge. What do you think about adding a |
|
Ref c458507 |
…#1) * make npm run cover compatible with Windows * accept function or array as type * improve documentation * replace Boolean by double-bang for coercion
|
Published as 1.1.0 - Awesome work! |
|
@phated |
See this discussion in gulpjs/vinyl-fs#168.
Ping @phated.
Modification in
package.jsonis explained here: gotwarlost/istanbul#90.