facebookarchive/prepack

Review module ids: number vs string

Open

#852 geöffnet am 28. Juli 2017

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (520 Forks)batch import
help wantedpriority: low

Repository-Metriken

Stars
 (14.268 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

The module system actually uses them interchangeably, assuming that numbers get converted to strings. However, in modules.js, we currently keep them around as number | string, as use that as indices into maps and elements of sets, where numbers and strings are getting distinguished.

We should systematically convert all modules ids to strings, and then consider replacing some of those Maps with plain Object.

Contributor Guide