$: npm install
$: npm run test:node
prior Set: Set { 'a', 'b' }
with spread syntax: Set { 'a', 'b', 'e' }
with Array.from: Set { 'a', 'b', 'e' }
$: npm run test:babel
prior Set: Set { 'a', 'b' }
with spread syntax: Set { Set { 'a', 'b' }, 'e' }
with Array.from: Set { 'a', 'b', 'e' }
The final line of the code shows an alternative syntax which will pass through babel unharmed, and will work on either end: