When we need to me destruction from array or object and change value then
we need make something like this

```js
let { first, second } = getSomeObject();
first = computeFirst(first);

// Or create temporary useless variable

const obj = getSomeObject();
const second = obj.second;
const first = computeFirst(obj.first);
```

I propose to make operator which will give ability to us to apply some
function to property inside destruction-syntax without mutable or temporary
variables

```js
const { first | computeFirst, second } = getSomeObject();
```

I think that syntax should be discussed, but it seems lie pipe-symbol is
well-known operator in bash and in AngularJS/Vue community.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to