abort-controller
                                
                                
                                
                                    abort-controller copied to clipboard
                            
                            
                            
                        Use native AbortController when possible.
This library uses browser field of package.json in order to avoid including a shim and uses own implementation otherwise. That however creates problems when used in Electron (main process) because there it loads a own implementation which native APIs like fetch reject with error like:
TypeError: Failed to execute 'fetch' on 'Window': member signal is not of type AbortSignal.
It would be nice if implementation still checked for presence of native AbortSignal just in case it exists.
Just in case other people stumble over this, there is the package https://github.com/achingbrain/native-abort-controller that works around this particular issue.