Closed jamestalmage closed 8 years ago
Great idea.
shamelessly steal entire implementation from any-promise
haha. Nice.
Another nice thing about this approach is it will work in the browser without requiring "Advanced Registration" for identifying the constructor. I am going to update the README to make this the preferred registration method.
/cc @tnguyen14 You will probably find the new "Registration Shortcut" feature of any-promise
useful.
Another nice thing about this approach is it will work in the browser without requiring
Yes, I realized that when writing our browser tests for any-observable
.
Thanks for the tip @kevinbeaty!
Published in v 1.3.0
It would be great to create a
register
folder in the package that contained a number of shortcut registrations.This solves the problem of
import
hoisting with ES6 modules:With a shortcut you can do:
Recent versions of Node and many test runners offer a
--require
flag. This can be useful for that too:We are doing it for
any-observable
(a fork of this that does the same thing for Observables): https://github.com/sindresorhus/any-observable/pull/10