montagejs / collections

This package contains JavaScript implementations of common data structures with idiomatic interfaces.
http://www.collectionsjs.com
Other
2.09k stars 185 forks source link

Make shim-array.js less breaking world around #173

Open a-x- opened 7 years ago

a-x- commented 7 years ago

closes #169 collections breaks Array.from with Iterables

hthetiot commented 7 years ago

lgtm

hthetiot commented 6 years ago

Can you rebase on master @a-x- ?

a-x- commented 6 years ago

done

hthetiot commented 6 years ago

Some test still break I will check why.

hthetiot commented 6 years ago

Need refactor to use internals if not extended.

a-x- commented 6 years ago

could you add an example?

As I understand someone may keep native, say, window.Array, but change its Array.prototype.some method. And you propose to replace whole Array In this case.

Am I correct?

hthetiot commented 6 years ago

@a-x- Sorry I really like to have that merge for fixing #196 but your changes break the tests.

As I understand someone may keep native, say, window.Array, but change its Array.prototype.some method. And you propose to replace whole Array In this case.

No.

What I propose is make sure collections internally use his Array functions if there have a difference with Native Array or use private functions if needed.

hthetiot commented 6 years ago

@a-x- I cannot merge if test fails.

to run test:

npm run test