polyfill icon indicating copy to clipboard operation
polyfill copied to clipboard

Add methods to Pair

Open ghost opened this issue 7 years ago • 2 comments

This is kind of a question as well as a feature request.

I would like to see the methods key and value added to the Pair class to make it easy to retrieve the two from the object.

Do you think this is feasible? Should I log this on the main repo instead?

ghost avatar Dec 11 '17 22:12 ghost

Definitely feasible. Methods or properties?

rtheunissen avatar Dec 16 '17 06:12 rtheunissen

I would think methods are the best approach. From the perspective of the extension you would be able to implement read-only properties, but the polyfill wouldn't be able to do that, so for parity, a couple of getters would be great :)

ghost avatar Dec 21 '17 12:12 ghost