sindresorhus / loud-rejection

Make unhandled promise rejections fail loudly instead of the default silent fail

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can/should loud-rejection be used in the browser?

callumlocke opened this issue · comments

  1. does it work in the browser?
  2. is it necessary in the browser?
  1. No, the browser uses slightly different naming for the events.
  2. 273a7c0

thanks!

You said browsers automatically log unhandled exceptions.. is this true only for the browser's built-in Promise type, or does this (somehow) work for stuff like es6-promise, bluebird too?

Should there be a noop browser.js alternative so people can easily browserify?

I usually use loud-rejection as part of cli.js so I don't think I would ever browserify it.

is this true only for the browser's built-in Promise type, or does this (somehow) work for stuff like es6-promise, bluebird too?

It's true for any Promise lib that emits the correct events, at least Bluebird does this.

Should there be a noop browser.js alternative so people can easily browserify?

Yeah, sure, just in case.