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:

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`.

Previously, previously, previously, previously.

Tags: , , , ,

  • Previously