getProperties Should Allow Brace Expansion Syntax


Not sure how difficult the implementation of this would be, but I found myself wanting to use the brace expansion syntax available to computed property declaration in the getProperties method.

As an example:

// Now
let thing = this.get('thing');
let { foo, bar } = thing.getProperties('foo', 'bar');

// Proposed
let { foo, bar } = this.getProperties('thing.{foo,bar}');

The implemention to expand properties for computed property keys (same syntax as above) is not wholey simple but shows how it can be done. Supporting less of the syntax would make the implementation much easier

If you find yourself wanting to access the same types of sub properties, then a more targeted helper might be easier to implement, something like let { foo, bar } = getPropertiesOf(this, 'thing', ['foo', 'bar'])