-
Notifications
You must be signed in to change notification settings - Fork 459
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
Define iterator for Napi::Array
for using with ranged for-loop or STL algorithms
#830
Comments
@aminya perhaps you mean an iterator for |
We shouldn't necessarily use the same iterator for these two types. I expect the |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
Unstale |
We discussed in the Node-API team meeting today and it seems reasonable but it might be a more complicated due to sparse arrays etc. @aminya would you be able to submit a PR? |
PR to add an iterator for |
This isn't fixed yet, though. |
Refs: nodejs#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: #830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs/node-addon-api#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs/node-addon-api#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs/node-addon-api#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Refs: nodejs/node-addon-api#830 Signed-off-by: Darshan Sen <darshan.sen@postman.com>
Currently, the only way to loop over the
Napi::Array
is to maintain the index manually and loop over using traditional for loops:However, I'd like to be able to use ranged for loop or STL algorithms:
or other similar examples
The text was updated successfully, but these errors were encountered: