Closed zloirock closed 1 day ago
uhm ... I've thought the whole point of context was to exist only when a primitive is passed?
quoting MDN which I am not going to fix anymore or contribute to for the time being:
A context object that holds state relevant to the current expression being revived. It is a new object for each invocation of the reviver function. It is only passed when reviving primitive values, but not when value is an object or array. It contains the following property:
source
are those pages broken? 'cause to me, and accordingly with the discussion around this proposal I've read, that is the expected behavior, it's impossible otherwise to disambiguate primitives from objects ... so who is right?
I see ... so:
source
property that is eventually added ... that's weird but I guess it reasons well in terms of fixed arity for the reviverThanks, this is indeed easy to fix.
It can be easily fixed.