Bind operator ... for destructuring

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Bind operator ... for destructuring

Andrea Giammarchi-2
Hello there 👋
  this is going to be quick: how about using the bind operator *at least* for destructuring?

// today
function util(ref) {
  if (ref.prop === 1)

// tomorrow?
function util({prop, ::method}) {
  if (prop === 1)

Such shortcut would simplify a lot of extra variables declarations and/or destructuring, both in the DOM world utilities, and in general in various helpers.



es-discuss mailing list
[hidden email]