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

Does not work with generator functions #57

Open
ehmicky opened this issue Aug 29, 2019 · 1 comment
Open

Does not work with generator functions #57

ehmicky opened this issue Aug 29, 2019 · 1 comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@ehmicky
Copy link

ehmicky commented Aug 29, 2019

This does not work with function* and yield:

const PowerCartesianProduct = require('power-cartesian-product')

const generator = function*() {
  yield 1
  yield 2
}

console.log([...new PowerCartesianProduct([generator()])]) // []
console.log([...generator()]) // [1, 2]

This can be worked around by converting generators to arrays, but not being able to use generators is a serious limitation when working with iterables.

@fisker fisker added bug Something isn't working help wanted Extra attention is needed enhancement New feature or request labels Aug 30, 2019
@fisker
Copy link
Owner

fisker commented Aug 30, 2019

Not related, but GeneratorFunction is supported in v0.0.4 #58 , Generator still not supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants