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: , , , ,

3 Responses:

  1. Steve Allen says:

    If I dereference the URL will my browser crash?

  2. Gordon says:

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

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

Leave a Reply

Your email address will not be published. But if you provide a fake email address, I will likely assume that you are a troll, and not publish your comment.

You may use these HTML tags and attributes: <a href="" title=""> <b> <blockquote cite=""> <code> <em> <i> <s> <strike> <strong> <img src="" width="" height="" style=""> <iframe src="" class=""> <video src="" class="" controls="" loop="" muted="" autoplay="" playsinline=""> <div class=""> <blink> <tt> <u>, or *italics*.

  • Previously