destructure
v0.1.0 destructure destructuring assignment unpack list tuple
destructure
Simple workaround for non-universal array destructuring assignment.
install
For Node.js:
npm install destructure
use
var destructure = require('destructure'); // Omit this line if including the destructure.js file in a browser
var arr = [3, 4, 5];
var added = destructure(arr, function (a, b, c) {
return a + b + c;
});
alert(added); // 12
npm i destructure
Source Code
github.com/brettz9/destructu...Metadata
- MIT
- Whatever
- Brett Zamir
- released 8/2/2013