Simple workaround for non-universal array destructuring assignment
JavaScript HTML
Switch branches/tags
Nothing to show
Latest commit ec9ea13 Jun 17, 2015 @brettz9 Just add changes file
Permalink
Failed to load latest commit information.
tests +Node test Aug 2, 2013
CHANGES.md Just add changes file Jun 17, 2015
README.md fix readme Aug 2, 2013
destructure.js Fix browser behavior Aug 2, 2013
license.txt Create license.txt Aug 2, 2013
package.json Update package.json Aug 2, 2013

README.md

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;
});
console.log(added); // 12