y to support autovivification in a more
>> class-based way, like Python does?
>>
>>
>>
>> ```javascript
>>
>> class AutoVivArray extends Array {
>> [Symbol.getMissing](identifier) {
>> /* if we're here, identifier is not an ownProp
Since we now have the "Optional Chaninig Operator" , perhaps a "Forced
Chaining Operator" would also be worth considering.
I, personally, could use it:
let table;
table!.user!.id!.type = 'int'
will evaluate to:
let table;
if ( ! ( table instanceOf Object) ) table = {};
if (
As there are more and more async apis, i would like to have a block, where
all promises within automaticly are awaited:
Proposal:
const image = await {
const user = fetch('/user/'+id).json();
fetch('/image/'+user.image).json();
}
___
t; !(a === b) // a !== b
>>>>
>>>
>>>
>>>> !(a > b) // a <= b
>>>> (!(a > b) && !(a == b)) // a < b
>>>>
>>>
>>> I'm not sure this is relevant to your larger point, and I've already
&g
I dont like to write:
if ( !('x' in obj) && !('y' in obj) ) {
doit()
}
I was even tempted to write it that way:
if ('x' in obj || 'y' in obj) { } else {
doit()
}
What about a !in operator to write it like this?
if ('x' !in obj && 'y' !in obj) {
doit()
}
ty, which is the actual
> proxy object in this case.
>
> Updated fiddle: https://jsfiddle.net/2dgefd9d/2/
>
> On Fri, Jul 28, 2017 at 5:37 PM, Tobias Buschor <tobias.busc...@shwups.ch>
> wrote:
>
>> wow, you are right!
>>
>> But this does not work.
>>
> myItems.getItem3();
> ```
> `this` will be `myItems` because that is how you have called it, meaning
> that `getItems3()` will behave just like if you had done `myItems.$3`.
>
> Your code works as expected in this Fiddle: https://jsfiddle.net/2dgefd9d/
>
> On Fri, Jul 28
I realy like the possibility to react to dynamic properties, like what you
can do with Proxies.
But Proxies are not the (my) perfect solution.
```
class items {
constructor() {
return new Proxy(this, {
get(target, name) {
if (name[0] === '$') return
8 matches
Mail list logo