Repository navigation
Histogram TypedArray support - #3211
Merged
Merged
Conversation
Collaborator
Author
|
@etpinard how do I avoid making this mistake with |
etpinard
reviewed
Nov 5, 2018
| 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]); |
Contributor
There was a problem hiding this comment.
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?
Collaborator
Author
There was a problem hiding this comment.
Good call - 1ca72c3
toEqual calls Array.concat profusely, so I had to rearrange a little to get this to work right...
Contributor
I'm voting for reverting all |
Merged
Contributor
|
Nicely done 💃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3210
I rearranged
Libarray utilities into one file (lib/array) and added one new one:Lib.concat, a clone ofArray.concatthat works withTypedArraysand mixed types.For now I only used it in one place, where it was needed to fix the histogram bug.