phetsims / axon

Axon provides powerful and concise models for interactive simulations, based on observable Properties and related patterns.
MIT License
11 stars 8 forks source link

rename contains to includes (ObservableArray, PhetioGroup) #306

Closed pixelzoom closed 4 years ago

pixelzoom commented 4 years ago

Now that we can use Array.includes... Let's deprecate ObservableArray contains and renaming to includes.

pixelzoom commented 4 years ago

I'll take a look at renaming contains to includes. But there are 263 occurrences of ".contains(". I guess I could change the implementation of contains to throw an Error, then identify in aqua locally.

pixelzoom commented 4 years ago

... and rename PhetioGroup.contains to includes?

pixelzoom commented 4 years ago

contains is now includes for ObservableArray and PhetioGroup. I ran aqua locally to identify and rename occurrences.

I'll leave this open until CT verifies.

pixelzoom commented 4 years ago

Slack developer channel:

PSA: ObservableArray and PhetioGroup contains is now includes . I believe that I changed all occurrences (tested using aqua), apologies if I missed any. https://github.com/phetsims/axon/issues/306

pixelzoom commented 4 years ago

No problems noted in CT. Since this was straightforward, I'm not going to request a review. Closing.