Closed ljharb closed 7 years ago
I generally agree that it's a bit weird, and to be honest, I think I'd be fine with dropping it. For Builtin.is(Date, undefined)
, we would just return false
.
That sounds great to me.
Alternatively, if we do want a single-arg function, it should probably be a separate one, instead of overloading is
.
For now, let's just dump the one-arg version entirely. We can add it back later if necessary. I'll update the PR a bit later today.
Sounds great. I can always replicate it by grabbing a Symbol.builtin method and calling it directly, and testing for an exception/undefined.
one arg has been removed
The one-arg
Builtin.is
is a bit weird.If it's trying to answer the question "is this built-in", then it should probably return false if the
Symbol.builtin
method is!==
the original one.However, I'm also not sure of the utility of the one-arg form in the first place.