-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Histogram TypedArray support #3211
Conversation
@etpinard how do I avoid making this mistake with |
test/jasmine/tests/lib_test.js
Outdated
var concat = Lib.concat; | ||
it('works with multiple Arrays', function() { | ||
expect(concat([1], [[2], 3], [{a: 4}, 5, 6])) | ||
.toEqual([1, [2], 3, {a: 4}, 5, 6]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lib.concat
is fantastic 🎉
Could we spyOn(Array.prototype, 'concat')
in this test-case to make sure it is called in the "all regular arrays" case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call - 1ca72c3
toEqual
calls Array.concat
profusely, so I had to rearrange a little to get this to work right...
I'm voting for reverting all |
Nicely done 💃 |
Fixes #3210
I rearranged
Lib
array utilities into one file (lib/array
) and added one new one:Lib.concat
, a clone ofArray.concat
that works withTypedArrays
and mixed types.For now I only used it in one place, where it was needed to fix the histogram bug.