If I had a large object, and needed all the properties of that object, is there a quick way to destructure that object?
So this:
const foo = {
name1: 'foo',
num1: 5,
bool1: true
friends1: ['bar', 'fizz', 'buzz'],
name2: 'foo',
num2: 5,
bool2: true
friends2: ['bar', 'fizz', 'buzz'],
name3: 'foo',
num3: 5,
bool3: true
friends3: ['bar', 'fizz', 'buzz'],
}
const {name1, num1, bool1, friends1, name2, num2, bool2, friends2, name3, num3, bool3, friends3} = foo;
Becomes this:
const {*} = foo;