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

String.prototype.contains #37

Closed
jgillich opened this issue Aug 1, 2014 · 8 comments
Closed

String.prototype.contains #37

jgillich opened this issue Aug 1, 2014 · 8 comments

Comments

@jgillich
Copy link
Contributor

jgillich commented Aug 1, 2014

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/contains

Traceur seems to implement it: https://github.com/google/traceur-compiler/blob/9fddf9687bb4ddb7db21f05633d1ebbd6f815165/src/runtime/polyfills/String.js#L69

Any way to use it with this transform? It doesn't work currently, I've tried. :)

@thlorenz
Copy link
Owner

thlorenz commented Aug 8, 2014

Can you try again with the newer version (we bumped traceur version used).

@jgillich
Copy link
Contributor Author

jgillich commented Aug 8, 2014

No difference with 1.3.

@thlorenz
Copy link
Owner

thlorenz commented Aug 8, 2014

Have you tried that this actually works with traceur itself? You can try here.

If it's not working there then es6ify can do nothing about it and you should file a bug with traceur.

@jgillich
Copy link
Contributor Author

jgillich commented Aug 8, 2014

Ok, the issue is that traceur has a runtime component that is not included in es6ify. There is a issue about that here: google/traceur-compiler#1007

Any plans to include it? I'm however not sure if it is a good idea because its quite a bit of code and the great thing about this transform is that it doesn't add much.

@guzart
Copy link
Collaborator

guzart commented Aug 8, 2014

You can include it using the browserify#add method, or there's a bower component, and npm standalone package

browserify()
  .add(es6ify.runtime)
  .transform(es6ify)
  ...

@jgillich
Copy link
Contributor Author

jgillich commented Aug 8, 2014

Ah that's neat, thanks!

@jgillich jgillich closed this as completed Aug 8, 2014
@thlorenz
Copy link
Owner

thlorenz commented Aug 8, 2014

Ah wow, I had assumed you read the readme and already knew that ;)

If that example is not obvious I'm open for improvements.

@jgillich
Copy link
Contributor Author

jgillich commented Aug 8, 2014

I usually read the readme, but it doesn't mention what the runtime is needed for in detail. 😉
I'll send you a PR.

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

No branches or pull requests

3 participants