get-destructor
Create a getter that supports destructuring.
Quick start
npm install --save get-destructor
const beatles = john: name: 'John' age: 40 paul: name: 'Paul' age: 75 ; const getter = ; ; // = { name: 'John', age: 40 } const john paul = ; // john = { name: 'John', age: 40 }// paul = { name: 'Paul', age: 75 }
API
getDestructor(getter:function) :function
getter
is called with all arguments or just the key in case of destructuring.