vue-local-storage icon indicating copy to clipboard operation
vue-local-storage copied to clipboard

remove includes in favor of indexOf

Open AriLFrankel opened this issue 4 years ago • 7 comments

picking up where https://github.com/pinguinjkeke/vue-local-storage/pull/37 leaves off

AriLFrankel avatar Oct 15 '19 23:10 AriLFrankel

Why polyfill is not an option?

pinguinjkeke avatar Oct 16 '19 11:10 pinguinjkeke

Here are my thoughts:

  1. Most importantly, clients of your library don't expect to be signing up for a polyfill of Array.includes when they install your library. They might have a competing polyfill implementation, or themselves not be polyfilling Array.includes for some reason of their own.
  2. I tend to prefer to do the minimum viable solution. Since this is the only case of using .includes in your code base, it feels gratuitous to pull in a polyfill.

What are your thoughts?

AriLFrankel avatar Oct 16 '19 14:10 AriLFrankel

:+1: for this PR. Forcing a client to use a polyfill for just one line in a third-party lib is a bit strange.

spotman avatar Oct 23 '19 08:10 spotman

@pinguinjkeke

AriLFrankel avatar Nov 16 '20 17:11 AriLFrankel

@pinguinjkeke

AriLFrankel avatar Jul 01 '21 14:07 AriLFrankel

@pinguinjkeke

AriLFrankel avatar Aug 16 '22 21:08 AriLFrankel

@pinguinjkeke

AriLFrankel avatar Aug 23 '23 22:08 AriLFrankel

I guess I'll just close this

AriLFrankel avatar Feb 15 '24 15:02 AriLFrankel