Closed hiroshige-g closed 4 years ago
The order used to sort scope keys etc., i.e. https://wicg.github.io/import-maps/#longer-or-code-unit-less-than
if a’s length is greater than b’s length, or if a is code unit less than b.
is not a total order. For example,
"A"
"AAA"
Probably this should be something like
if a’s length is greater than b’s length, or if a’s length is equal to b’s length and a is code unit less than b.
or simply
if b is code unit less than a.
Probably the latter one is better, because it's simple to understand and implement. I'll create a PR shortly.
(Memo: code unit less than also seems to have a spec bug)
code unit less than
The order used to sort scope keys etc., i.e. https://wicg.github.io/import-maps/#longer-or-code-unit-less-than
is not a total order. For example,
"A"
is longer-or-code-unit-less-than"AAA"
"AAA"
is longer-or-code-unit-less-than"A"
Probably this should be something like
or simply
Probably the latter one is better, because it's simple to understand and implement. I'll create a PR shortly.
(Memo:
code unit less than
also seems to have a spec bug)