Skip to content
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

test for ES6 String.prototype.contains #860

Merged
merged 1 commit into from
Mar 24, 2013

Conversation

robertkowalski
Copy link
Contributor

This adds a test for the ES6 String.prototype.contains

@ryanseddon
Copy link
Member

Modernizr has a couple of helpers to do typeof of {}.toString.call checks.

You can either pull in is or toStringFn as dependencies and do the following checks.

is(String.prototype.contains, "function");

or

toStringFn.call(String.prototype.contains) === "[object Function]";

@robertkowalski
Copy link
Contributor Author

Thanks alot for the input, just updated the PR. I changed it to use the is-helper.

ryanseddon added a commit that referenced this pull request Mar 24, 2013
@ryanseddon ryanseddon merged commit f9b3da2 into Modernizr:master Mar 24, 2013
patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants