Closed Uzlopak closed 1 month ago
altho, there's really no point in doing this, since is-typed-array just calls which-typed-array.
@ljharb Clear benefit here would be 4 less dependencies, for no loss in compatibility or behaviour robustness. What is the disadvantage?
oh, sorry, I thought which-typed-array used is-typed-array, but it's the other way around, so yeah, that would be one extra dependency. my bad.
I'd forgotten, but this is actually why I chose which-typed-array in the first place - because it does the same job with fewer dependencies.
I'd forgotten, but this is actually why I chose which-typed-array in the first place - because it does the same job with fewer dependencies.
Why did you even create is-typed-array
if which-typed-array
is sufficient?
Initially it didn’t use which-typed-array, and, it’s clearer to have a predicate for the relevant use cases. Later i refactored to have one use the other, to maximize dependency deduplication.
We should use is-typed-array instead of which-typed-array.