Open thelunararmy opened 7 years ago
Apologies, JC, for easter eggs of the "wtf" variety. Our first run at this was in shotgun-to-head mode, just sketching to see if it was even viable to create this package. I made an effort to rough out even the parts I didn't understand or that we didn't need right away in the "normalize an algorithm algorithm", just to help resolve the mystery. When this thing hits 1.0.0, we're all going to owe you a mighty debt for driving it home. Admirable work thus far! Thank you.
Many of the core normalization code is left stubbed or unfinished. Upon analysis with @EternalDeiwos, we see that there is just a lot of dead code that either gets ignored or passed along. A prime example is line 113 in
SupportedAlgorithm.js
:normalizedAlgorithm[key] = this.normalize(WTF, idlValue)
Which passes in an undefined objected callWTF
but still gets accepted. There is a lot of cleanup and refactoring available here.