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

Use 'includes' instead of 'contains'? #379

Open
danwenzel opened this issue Feb 13, 2018 · 4 comments
Open

Use 'includes' instead of 'contains'? #379

danwenzel opened this issue Feb 13, 2018 · 4 comments

Comments

@danwenzel
Copy link

JS convention seems to have moved toward using the method name includes instead of contains. For enumerables, Ember is deprecating contains, and includes is pretty much the only available method on JS strings.

Shouldn't ember-cli-page-object follow this same convention, and use includes here instead of contains? http://ember-cli-page-object.js.org/docs/v1.13.x/api/contains

@san650
Copy link
Owner

san650 commented Feb 14, 2018

@danwenzel I like the suggestion!

If we do this, we should deprecate contains first and make includes available. We could drop de deprecation in v2.0

@mum-never-proud
Copy link
Contributor

includes is not supported in IE (incase we are supporting it) can we go with good old indexOf?

@danwenzel
Copy link
Author

danwenzel commented Jun 16, 2020

@mum-never-proud - I am referring to ember-cli-page-object's method names

@ro0gr
Copy link
Collaborator

ro0gr commented Feb 22, 2023

I think we should deprecate contains((after v2 is released) without making new includes( API. Users can directly use built-in string method, like myNode.text.includes('something')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants