yuriyyakym/awai

Fix sync/async distinguishing in Selector

Opened this issue · 0 comments

Right now asyncSelector is used if either any of dependencies is async readable, or if predicate's constructor is AsyncFunction.

const isAsyncPredicate = predicate.constructor.name === 'AsyncFunction';

Source

Current behavior

It does not work in some JS engines, like JSC.

Expected behavior

It works in any JS engine.