Jordan Harband
Jordan Harband
While this is certainly a technically viable resolution for `resolve`, I am very very very loath to add to the exposed API of `is-core-module`.
It seems to me like there's a simple answer here: instead of taking trim *characters* (which then begs the question of, what about code units? grapheme clusters? etc), why not...
That's the code unit/code point/grapheme problem, and the language doesn't really handle graphemes holistically.
Presumably it wouldn't be any less performant than the (potentially polluted) [[Get]] on `.then` itself? All of the same optimizations currently used to determine when `Promise.prototype.then` is present, unmodified, and...
The entire reason for this proposal is because the committee did not want magic behavior for Namespace objects; they wanted a general-purpose solution.
That's more of a stage 2 concern, but yes, I would imagine so - module namespace objects are meant to be fully immutable. (edit: sorry, closed by accident)
I think you may want to file an [RFC](https://github.com/npm/rfcs) for this?
@cawa-93 of course you can; that info is statically determinable and also present in the installed package.json.
A string isn’t guaranteed to be a valid URL - isn’t this akin to the entire motivation for trusted types?
I believe momentjs supports those phrases.