You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/04/11 15:12:45 UTC

[GitHub] [arrow] domoritz commented on a change in pull request #9962: ARROW-12303: [JS] Use iterator instead of yield

domoritz commented on a change in pull request #9962:
URL: https://github.com/apache/arrow/pull/9962#discussion_r611202891



##########
File path: js/src/util/bit.ts
##########
@@ -64,16 +64,52 @@ export function packBools(values: Iterable<any>) {
 }
 
 /** @ignore */
-export function* iterateBits<T>(bytes: Uint8Array, begin: number, length: number, context: any,
-                                get: (context: any, index: number, byte: number, bit: number) => T) {
-    let bit = begin % 8;
-    let byteIndex = begin >> 3;
-    let index = 0, remaining = length;
-    for (; remaining > 0; bit = 0) {
-        let byte = bytes[byteIndex++];
-        do {
-            yield get(context, index++, byte, bit);
-        } while (--remaining > 0 && ++bit < 8);
+// @ts-ignore

Review comment:
       ```suggestion
   ```
   
   Ups, left some debugging code in here. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org