Example object with properties that would previously unnecessarily get wrapped in quotes (examples taken from [2] and [3]):const object = {π: {ಠ_ಠ: {ლ_ಠ益ಠ_ლ: {λ: {Ꙭൽↈⴱ: {ᱹ:{〱〱: {Ⅳ: {Ⅴ:
{Hͫ̆̒̐ͣ̊̄ͯ͗͏̵̗̻̰̠̬͝ͅE̴̷̬͎̱̘͇͍̾ͦ͊͒͊̓̓̐_̫̠̱̩̭̤͈̑̎̋ͮͩ̒͑̾͋͘Ç̳͕̯̭̱̲̣̠̜͋̍O̴̦̗̯̹̼ͭ̐ͨ̊̈͘͠M̶̝̠̭̭̤̻͓͑̓̊ͣͤ̎͟͠E"̞̮̹͍̞̳̣ͣͪ͐̈T"̯̳̭̜̠͕͌̈́̽̿ͤ̿̅̑Ḧ̱̱̺̰̳̹̘̰́̏ͪ̂̽͂̀͠: {Ƞ: {ȡ: {_҇: true}}}}}}}}}}}}};The current result for the deepest property is:
["π"]["ಠ_ಠ"]["ლ_ಠ益ಠ_ლ"]["λ"]["Ꙭൽↈⴱ"]["ᱹ"]["〱〱"]["Ⅳ"]["Ⅴ"]["Hͫ̆̒̐ͣ̊̄ͯ͗͏̵̗̻̰̠̬͝ͅE̴̷̬͎̱̘͇͍̾ͦ͊͒͊̓̓̐_̫̠̱̩̭̤͈̑̎̋ͮͩ̒͑̾͋͘Ç̳͕̯̭̱̲̣̠̜͋̍O̴̦̗̯̹̼ͭ̐ͨ̊̈͘͠M̶̝̠̭̭̤̻͓͑̓̊ͣͤ̎͟͠E"̞̮̹͍̞̳̣ͣͪ͐̈T"̯̳̭̜̠͕͌̈́̽̿ͤ̿̅̑Ḧ̱̱̺̰̳̹̘̰́̏ͪ̂̽͂̀͠"]["Ƞ"]["ȡ"]["_҇"]
With this patch, the result is:
π.ಠ_ಠ.ლ_ಠ益ಠ_ლ.λ.Ꙭൽↈⴱ.ᱹ.〱〱.Ⅳ.Ⅴ.Hͫ̆̒̐ͣ̊̄ͯ͗͏̵̗̻̰̠̬͝ͅE̴̷̬͎̱̘͇͍̾ͦ͊͒͊̓̓̐_̫̠̱̩̭̤͈̑̎̋ͮͩ̒͑̾͋͘Ç̳͕̯̭̱̲̣̠̜͋̍O̴̦̗̯̹̼ͭ̐ͨ̊̈͘͠M̶̝̠̭̭̤̻͓͑̓̊ͣͤ̎͟͠E"̞̮̹͍̞̳̣ͣͪ͐̈T"̯̳̭̜̠͕͌̈́̽̿ͤ̿̅̑Ḧ̱̱̺̰̳̹̘̰́̏ͪ̂̽͂̀͠.Ƞ.ȡ._҇
This is valid since each of the property names is a valid `IdentifierName`.
You doom us all to inhuman toil for the One whose Identifier cannot be quoted in the Basic Multilingual Plane.
1969471: Remove more cases of excessive quotes in property paths:
Tags: computers, doomed, glitch, mad science, zalgo
3 Responses:
If I dereference the URL will my browser crash?
Old Reader was not impressed, but did not die horribly.
Also from the link "This patch improves the `useDotNotation` regular expression"... you know what they say about regular expressions...
The identifiers in quoted example fall entirely within the Basic Multilingual Plane. I agree with the premise of this title — we must go beyond! Luckily, ES2015 actually allows identifier characters from the astral plane, such as 𐊧 (U+102A7 CARIAN LETTER A2). I’ll leave it as an exercise to the reader to turn such symbols into a Cthulhu-worthy identifier.