James DiGioia 7142a79eb9 Bring pipelineOperator flag in line with minimal
The minimal proposal requires parentheses around arrow functions
and bans await from the pipeline.
2018-04-27 23:15:21 +02:00

8 lines
187 B
JavaScript

// Array destructing
const result = [0] |> (([x]) => x);
expect(result).toBe(0);
// Object destructuring
const result2 = { y: 1, z: 2 } |> (({ y, z }) => y + z);
expect(result).toBe(3);