/*globals module, define*/
/**
* Simple workaround for non-universal array destructuring assignment
* @param {array} arr Array of values to destructure
* @param {function} unpackCb The callback which will be passed each value of the array in order
* @returns {*} Returns the result of the unpackCb() execution
* @example
* var destructure = require('destructure');
* var arr = [3, 4, 5];
* var added = destructure(arr, function (a, b, c) {
*     return a + b + c;
* });
* alert(added); // 12
*/
(function () {
    'use strict';

function destructure (arr, unpackCb) {
    return unpackCb.apply(null, arr);
}

if (typeof define === 'function' && define.amd) {
    define(function () {
        return destructure;
    });
}
else if (typeof module === 'object' && module.hasOwnProperty('exports')) {
    module.exports = destructure;
}
else {
    this.destructure = destructure;
}

}());

/*globals module*/
/**
* Simple workaround for non-universal array destructuring assignment
* @param {array} arr Array of values to destructure
* @param {function} unpackCb The callback which will be passed each value of the array in order
* @returns {*} Returns the result of the unpackCb() execution
* @example
* var destructure = require('destructure');
* var arr = [3, 4, 5];
* var added = destructure(arr, function (a, b, c) {
*     return a + b + c;
* });
* alert(added); // 12
*/
module.exports = function destructure (arr, unpackCb) {
    'use strict';
    return unpackCb.apply(null, arr);
};

--- 
+++ 
@@ -1,4 +1,4 @@
-/*globals module, define*/
+/*globals module*/
 /**
 * Simple workaround for non-universal array destructuring assignment
 * @param {array} arr Array of values to destructure
@@ -12,23 +12,7 @@
 * });
 * alert(added); // 12
 */
-(function () {
+module.exports = function destructure (arr, unpackCb) {
     'use strict';
-
-function destructure (arr, unpackCb) {
     return unpackCb.apply(null, arr);
-}
-
-if (typeof define === 'function' && define.amd) {
-    define(function () {
-        return destructure;
-    });
-}
-else if (typeof module === 'object' && module.hasOwnProperty('exports')) {
-    module.exports = destructure;
-}
-else {
-    this.destructure = destructure;
-}
-
-}());
+};
Add browser & amd support
