benlesh / symbol-observable

Symbol.observable ponyfill

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is not a ponyfill, documentation (and code structure) is misleading

ChALkeR opened this issue · comments

It monkey-patches built-in Symbol object here, right in ponyfill.js file:

result = Symbol.for('https://github.com/benlesh/symbol-observable');
try {
Symbol.observable = result;

That goes against how ponyfill is defined:

A ponyfill, in contrast, doesn't monkey patch anything

Please update the documentation or remove monkey-patching built-ins to avoid confusion.

This is a classical polyfill and should be called accordingly.