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

ES2015 iterator support not really provided #173

Open
ralf-o opened this issue Sep 1, 2015 · 3 comments
Open

ES2015 iterator support not really provided #173

ralf-o opened this issue Sep 1, 2015 · 3 comments

Comments

@ralf-o
Copy link

ralf-o commented Sep 1, 2015

The following sentence from the mori website is currently not really true:
"All Mori collections support ES6 iteration via foo[Symbol.iterator] or foo['@@iterator']"

mori.list(1, 2, 3)['@@iterator'] returns undefined.

See also: http://jsfiddle.net/4utqrsta

@neverfox
Copy link

JSFiddle is ES5, so of course it doesn't work there. You would need to bring in something like Babel to start seeing those features work. That said, you're still correct that it's undefined even in an ES6 context.

@dead-claudia
Copy link

After fixing it to Symbol.iterator instead of '@@iterator', I can still confirm.

@wishfoundry
Copy link

looks like closure compiler is messing with that. in 0.3.2 I found setting

list[Symbol.iterator] = list.prototype['undefined']

clears seem to work

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

4 participants