Is the only problem here is the parser problem with `obj.prop?.2:.1`? Then how
about `??. ` instead of `?.`?
>Once upon a time, there was a fascinating proposal on this subject:
Why are you posting twice? :/
___
es-discuss mailing list
In current ECMAScript, it is legal to place a variable declaration inside the
initialiser of a `for` loop, as well as to declare the variable used by a
`for...in` or `for...of` loop within the declaring expression:
for (let i = 0; i < 5; ++i) console.log(i);
for (let item of collection)
```
JSON.parse(str, (k, b) => {
if (v && typeof v === 'object' && !Array.isArray(v)) {
return Object.create(null, Object.getOwnPropertyDescriptors(v));
}
return v;
});
```
On Mon, Sep 19, 2016 at 1:13 AM, 段垚 wrote:
> Hi,
>
> It is usually a bad practice to let a map
Hi,
It is usually a bad practice to let a map object (an plain object used
as a key-value map) have a prototype.
Objects created by JSON.parse() have a prototype by default, and we can
get rid of them by:
JSON.parse(str, function(k, v) {
if (v && typeof v === 'object' &&
On Fri, Sep 30, 2016 at 7:23 AM, Allen Wirfs-Brock
wrote:
> On Sep 30, 2016 6:10 AM, Kevin Smith wrote:
>> Ideally there will be an `async` version of do expressions, which evaluate
>> to a promise:
>>
>> ```
>> let promise = async do {
>> await
On Sep 30, 2016 6:10 AM, Kevin Smith wrote:
>
> Ideally there will be an `async` version of do expressions, which evaluate to a promise:
>
> ```
> let promise = async do {
> await something();
> };
> ```
>
> (BTW, if we get such a thing, we might not really need
Ideally there will be an `async` version of do expressions, which evaluate
to a promise:
```
let promise = async do {
await something();
};
```
(BTW, if we get such a thing, we might not really need
top-level-module-await...)
On Fri, Sep 30, 2016 at 2:39 AM Olivier Lalonde
Disregard my reply as it doesn't make sense. :-)
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Step 4 of
http://www.ecma-international.org/ecma-262/7.0/index.html#sec-json.parse
says that `__proto__` shouldn't have special meaning when parsing.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Besides U+2028 and U+2029, there is also the __proto__ key, which has a special
meaning in JS as implemented in browser. That prevents definitely to "safely"
embed arbitrary JSON within JS.
—Claude
> Le 29 sept. 2016 à 23:21, Richard Gibson a écrit :
>
> ECMAScript
Do "do expressions" support the "await" keyword?
On Thu, Sep 29, 2016 at 3:59 PM, Rick Waldron
wrote:
>
>
> On Thu, Sep 29, 2016 at 3:14 PM Michał Wadas
> wrote:
>
>> Similar proposal is already here, do expressions.
>>
>
> Additionally...
>
>>
>>
11 matches
Mail list logo