{"_id":"array-extended","_rev":"3220718","name":"array-extended","description":"Additional array extensions with a chainable api","dist-tags":{"latest":"0.0.11"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"time":{"modified":"2024-03-21T07:22:04.000Z","created":"2013-01-16T21:24:54.798Z","0.0.11":"2014-04-01T20:41:09.959Z","0.0.10":"2014-04-01T17:57:52.184Z","0.0.9":"2013-06-17T22:35:38.732Z","0.0.8":"2013-06-06T21:29:26.937Z","0.0.7":"2013-06-06T20:30:35.693Z","0.0.6":"2013-06-05T05:41:12.918Z","0.0.5":"2013-04-16T15:39:52.121Z","0.0.4":"2013-02-19T20:13:29.979Z","0.0.3":"2013-01-22T06:40:15.375Z","0.0.2":"2013-01-17T04:13:30.862Z","0.0.1":"2013-01-16T21:24:54.798Z"},"users":{},"author":{"name":"Doug Martin"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"versions":{"0.0.11":{"name":"array-extended","version":"0.0.11","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/8..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","arguments-extended":"~0.0.3"},"devDependencies":{"it":"~0.2.0","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.3","grunt-it":"~0.3.0"},"bugs":{"url":"https://github.com/doug-martin/array-extended/issues"},"homepage":"https://github.com/doug-martin/array-extended","_id":"array-extended@0.0.11","dist":{"shasum":"d7144ae748de93ca726f121009dbff1626d164bd","size":18903,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.11.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.11.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1396384869959,"_hasShrinkwrap":false,"_cnpm_publish_time":1396384869959,"_cnpmcore_publish_time":"2021-12-16T13:32:28.537Z"},"0.0.10":{"name":"array-extended","version":"0.0.10","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/8..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3"},"devDependencies":{"it":"~0.2.0","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.3","arguments-extended":"~0.0.3","grunt-it":"~0.3.0"},"bugs":{"url":"https://github.com/doug-martin/array-extended/issues"},"homepage":"https://github.com/doug-martin/array-extended","_id":"array-extended@0.0.10","dist":{"shasum":"f9ad6e1433049d7dfcdf3c6f32fc0e300f42180f","size":18520,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.10.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1396375072184,"_hasShrinkwrap":false,"_cnpm_publish_time":1396375072184,"_cnpmcore_publish_time":"2021-12-16T13:32:28.772Z"},"0.0.9":{"name":"array-extended","version":"0.0.9","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/8..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.3","arguments-extended":"~0.0.3"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/doug-martin/array-extended/issues"},"_id":"array-extended@0.0.9","dist":{"shasum":"7beeb361a7a9802d2c28f0081e0db8a99fdb4ce6","size":15347,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.9.tgz"},"_from":".","_npmVersion":"1.2.25","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1371508538732,"_hasShrinkwrap":false,"_cnpm_publish_time":1371508538732,"_cnpmcore_publish_time":"2021-12-16T13:32:29.030Z"},"0.0.8":{"name":"array-extended","version":"0.0.8","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/8..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.3","arguments-extended":"~0.0.3"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/doug-martin/array-extended/issues"},"_id":"array-extended@0.0.8","dist":{"shasum":"eab7aee5f4b697b3e4425b64bec30e02f50ce360","size":15284,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.8.tgz"},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1370554166937,"_hasShrinkwrap":false,"_cnpm_publish_time":1370554166937,"_cnpmcore_publish_time":"2021-12-16T13:32:29.289Z"},"0.0.7":{"name":"array-extended","version":"0.0.7","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/8..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.3"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/doug-martin/array-extended/issues"},"_id":"array-extended@0.0.7","dist":{"shasum":"263c15e3ec704b56a7a9265e306623fa13960c03","size":15276,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.7.tgz"},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1370550635693,"_hasShrinkwrap":false,"_cnpm_publish_time":1370550635693,"_cnpmcore_publish_time":"2021-12-16T13:32:29.499Z"},"0.0.6":{"name":"array-extended","version":"0.0.6","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/6..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.3"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.0"},"readmeFilename":"README.md","bugs":{"url":"https://github.com/doug-martin/array-extended/issues"},"_id":"array-extended@0.0.6","dist":{"shasum":"1bb2f51621d51212fbddee40d9ce6ad3686f0521","size":15445,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.6.tgz"},"_from":".","_npmVersion":"1.2.23","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1370410872918,"_hasShrinkwrap":false,"_cnpm_publish_time":1370410872918,"_cnpmcore_publish_time":"2021-12-16T13:32:29.716Z"},"0.0.5":{"name":"array-extended","version":"0.0.5","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":["ie/6..latest","chrome/20..latest","firefox/14..latest","safari/latest","iphone/6","ipad/6"]},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3","grunt-contrib-uglify":"~0.2.0","grunt":"~0.4.1","grunt-contrib-jshint":"~0.4.3"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.3.0"},"readmeFilename":"README.md","_id":"array-extended@0.0.5","dist":{"shasum":"72f7de5c79bb52a37b51d5a616ea1220b18e2feb","size":15157,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.5.tgz"},"_from":".","_npmVersion":"1.2.17","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1366126792121,"_hasShrinkwrap":false,"_cnpm_publish_time":1366126792121,"_cnpmcore_publish_time":"2021-12-16T13:32:29.967Z"},"0.0.4":{"name":"array-extended","version":"0.0.4","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":{"ie":[6,7,8,9],"chrome":[4,23,"canary"],"firefox":[3,3.5,3.6,4,17,"nightly"],"opera":[10,10.5,11,11.5,11.6,12,"next"],"safari":["5.0.1",5.1]}},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.2.1"},"readmeFilename":"README.md","_id":"array-extended@0.0.4","dist":{"shasum":"3abaf684d47bb8dc098a46a50666479bfc3a9b35","size":15282,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.4.tgz"},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1361304809979,"_hasShrinkwrap":false,"_cnpm_publish_time":1361304809979,"_cnpmcore_publish_time":"2021-12-16T13:32:30.220Z"},"0.0.3":{"name":"array-extended","version":"0.0.3","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"testling":{"files":"test/browserling.js","browsers":{"ie":[6,7,8,9],"chrome":[4,23,"canary"],"firefox":[3,3.5,3.6,4,17,"nightly"],"opera":[10,10.5,11,11.5,11.6,12,"next"],"safari":["5.0.1",5.1]}},"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"~0.0.3","is-extended":"~0.0.3"},"devDependencies":{"it":"~0.2.0","grunt-it":"~0.2.1"},"readmeFilename":"README.md","_id":"array-extended@0.0.3","dist":{"shasum":"a0668a6ffed5997b1d05bc98dfcba5f20cd4c4da","size":14732,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.3.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1358836815375,"_hasShrinkwrap":false,"_cnpm_publish_time":1358836815375,"_cnpmcore_publish_time":"2021-12-16T13:32:30.415Z"},"0.0.2":{"name":"array-extended","version":"0.0.2","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extended":"0.0.2","is-extended":"0.0.2"},"devDependencies":{"it":"~0.1.0","grunt-it":"~0.2.1"},"readmeFilename":"README.md","_id":"array-extended@0.0.2","dist":{"shasum":"e2323b4d9a6a95ae216e9107af5114a91a3f4724","size":14342,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.2.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1358396010862,"_hasShrinkwrap":false,"_cnpm_publish_time":1358396010862,"_cnpmcore_publish_time":"2021-12-16T13:32:30.622Z"},"0.0.1":{"name":"array-extended","version":"0.0.1","description":"Additional array extensions with a chainable api","main":"index.js","scripts":{"test":"it -r dot"},"repository":{"type":"git","url":"git:git@github.com:doug-martin/array-extended.git"},"keywords":["Array","extender","utilities"],"author":{"name":"Doug Martin"},"license":"MIT","dependencies":{"extender":"0.0.4","is-extended":"0.0.1"},"devDependencies":{"it":"~0.1.0","grunt-it":"~0.3.0"},"readmeFilename":"README.md","_id":"array-extended@0.0.1","dist":{"shasum":"a00741be770a0ca5de9efdc8451208662df53b5d","size":14403,"noattachment":false,"key":"/array-extended/-/array-extended-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/array-extended/download/array-extended-0.0.1.tgz"},"_npmVersion":"1.2.0","_npmUser":{"name":"damartin","email":"doug@dougamartin.com"},"maintainers":[{"name":"damartin","email":"doug@dougamartin.com"}],"directories":{},"publish_time":1358371494798,"_hasShrinkwrap":false,"_cnpm_publish_time":1358371494798,"_cnpmcore_publish_time":"2021-12-16T13:32:30.865Z"}},"readme":"[![Build Status](https://travis-ci.org/doug-martin/array-extended.png?branch=master)](https://travis-ci.org/doug-martin/array-extended)\n\n[![browser support](https://ci.testling.com/doug-martin/array-extended.png)](https://ci.testling.com/doug-martin/array-extended)\n\n# array-extended\n\n`array-extended` is a Javascript library that can be used standalone or incorporated into [`extended`](https://github.com/doug-martin/extended)\n\n```javascript\nvar array = require(\"array-extended\");\n```\n\nOr\n\n```javascript\nvar myextended = require(\"extended\")\n\t.register(require(\"array-extended\"));\n```\n\n## Installation\n\n```\nnpm install array-extended\n```\n\nOr [download the source](https://raw.github.com/doug-martin/array-extended/master/index.js) ([minified](https://raw.github.com/doug-martin/array-extended/master/array-extended.min.js))\n\n## Usage\n\n`array-extended` includes many useful methods that for array. All of the functions can be chained together using `array-exteded` as a function or you can use the functions directly as shown in the examples.\n\n The following native `ES5` methods are included for completeness.\n\n * `forEach`\n * `map`\n * `filter`\n * `reduce`\n * `reduceRight`\n * `some`\n * `every`\n * `indexOf`\n * `lastIndexOf`\n\n**Note** `forEach` returns the original array for chaining purposes.\n\n**`sum`**\n\nSums the values of an array.\n\n```javascript\n\narray.sum([1,2,3]); //6\n\narray([1,2,3]).sum().value(); //6\n\n```\n\n**`avg`**\n\nFinds the average of an array of numbers.\n\n```javascript\n\narray.avg([1,2,3]); //2\n\narray([1,2,3]).avg().value(); //2\n\n```\n\n**`sort`**\n\nSorts an array based on a property, by natural ordering, or by a custom comparator.\n\n**Note** this does not change the original array.\n\n```javascript\n\narray.sort([{a: 1},{a: 2},{a: -2}], \"a\"); //[{a: -2},{a: 1},{a: 2}];\n\narray([{a: 1},{a: 2},{a: -2}]).sort(\"a\"); //[{a: -2},{a: 1},{a: 2}];\n\n\n```\n\n**`min`**\n\nFinds the minimum value in an array based on a property, by natural ordering, or by a custom comparator.\n\n```javascript\n\narray.min([ 3, -3, -2, -1, 1, 2]); //-3\n\narray.min([{a: 1},{a: 2},{a: -2}], \"a\"); //{a : -2}\n\narray([ 3, -3, -2, -1, 1, 2]).min(); //-3\n\narray([{a: 1},{a: 2},{a: -2}]).min(\"a\"); //{a : -2}\n\n```\n\n**`max`**\n\nFinds the maximum value in an array based on a property, by natural ordering, or by a custom comparator.\n\n```javascript\n\narray.max([ 3, -3, -2, -1, 1, 2]); //2\n\narray.max([{a: 1},{a: 2},{a: -2}], \"a\"); //{a : 2}\n\narray([ 3, -3, -2, -1, 1, 2]).max(); //2\n\narray([{a: 1},{a: 2},{a: -2}]).max(\"a\"); //{a : 2}\n\n```\n\n**`difference`**\n\nFinds the difference between two arrays.\n\n```javascript\narray.difference([1, 2, 3], [2]); //[1, 3]\narray.difference([true, false], [false]); //[true]\narray.difference([\"a\", \"b\", 3], [3]); //[\"a\", \"b\"]\n\nvar a = , b = , c = ;\narray.difference([{a: 1}, {a: 2}, {a: 3}], [{a: 2}, {a: 3}]); //[{a: 1}]\n\narray([true, false]).difference([false]).value()// [true]\narray([1, 2, 3]).difference([2]).value()// [1, 3]\narray([1, 2, 3]).difference([2], [3]).value(); //[1]\narray([\"a\", \"b\", 3]).difference([3]).value(); [\"a\", \"b\"]\narray([{a: 1}, {a: 2}, {a: 3}]).difference([{a: 2}, {a: 3}]).value(); [{a: 1}]\n```\n\n**`unique`**\n\nRemoved duplicate values from an array.\n\n```javascript\n\narray.unique([1, 2, 2, 3, 3, 3, 4, 4, 4]); //[1, 2, 3, 4]\narray([1, 2, 2, 3, 3, 3, 4, 4, 4]).unique().value();  //[1, 2, 3, 4]\n\narray([\"a\", \"b\", \"b\"]).unique().value(); //[\"a\", \"b\"]\narray.unique([\"a\", \"b\", \"b\"]); //[\"a\", \"b\"]\n\n```\n\n**`rotate`**\n\nRotates an array by the number of places for 1 position by default.\n\n```javascript\n\nvar arr = array([\"a\", \"b\", \"c\", \"d\"])\narr.rotate().value();   //[\"b\", \"c\", \"d\", \"a\"]\narr.rotate(2).value();  //[\"c\", \"d\", \"a\", \"b\"]\narr.rotate(3).value();  //[\"d\", \"a\", \"b\", \"c\"]\narr.rotate(4).value();  //[\"a\", \"b\", \"c\", \"d\"]\narr.rotate(-1).value(); //[\"d\", \"a\", \"b\", \"c\"]\narr.rotate(-2).value(); //[\"c\", \"d\", \"a\", \"b\"]\narr.rotate(-3).value(); //[\"b\", \"c\", \"d\", \"a\"]\narr.rotate(-4).value(); //[\"a\", \"b\", \"c\", \"d\"]\n\nvar arr = [\"a\", \"b\", \"c\", \"d\"];\narray.rotate(arr);     //[\"b\", \"c\", \"d\", \"a\"]\narray.rotate(arr, 2);  //[\"c\", \"d\", \"a\", \"b\"]\narray.rotate(arr, 3);  //[\"d\", \"a\", \"b\", \"c\"]\narray.rotate(arr, 4);  //[\"a\", \"b\", \"c\", \"d\"]\narray.rotate(arr, -1)  //[\"d\", \"a\", \"b\", \"c\"]\narray.rotate(arr, -2); //[\"c\", \"d\", \"a\", \"b\"]\narray.rotate(arr, -3); //[\"b\", \"c\", \"d\", \"a\"]\narray.rotate(arr, -4); //[\"a\", \"b\", \"c\", \"d\"]\n\n```\n\n**`permutations`**\n\nFinds all permutations of an array.\n\n```javascript\n\narray([1, 2, 3]).permutations(); //[\n                                 //   [ 1, 2, 3 ],\n                                 //   [ 1, 3, 2 ],\n                                 //   [ 2, 3, 1 ],\n                                 //   [ 2, 1, 3 ],\n                                 //   [ 3, 1, 2 ],\n                                 //   [ 3, 2, 1 ]\n                                 //]\n\narray([1, 2, 3]).permutations(2);//[\n                                 //   [ 1, 2],\n                                 //   [ 1, 3],\n                                 //   [ 2, 3],\n                                 //   [ 2, 1],\n                                 //   [ 3, 1],\n                                 //   [ 3, 2]\n                                 //]\n\narray.permutations([1, 2, 3]);   //[\n                                 //   [ 1, 2, 3 ],\n                                 //   [ 1, 3, 2 ],\n                                 //   [ 2, 3, 1 ],\n                                 //   [ 2, 1, 3 ],\n                                 //   [ 3, 1, 2 ],\n                                 //   [ 3, 2, 1 ]\n                                 //]\n\narray.permutations(([1, 2, 3], 2);//[\n                                 //   [ 1, 2],\n                                 //   [ 1, 3],\n                                 //   [ 2, 3],\n                                 //   [ 2, 1],\n                                 //   [ 3, 1],\n                                 //   [ 3, 2]\n                                 //]\n\n```\n\n**`zip`**\n\nZips the values of multiple arrays into a single array.\n\n```javascript\n\narray([1]).zip([2], [3]).value();                    //[\n                                                     //  [ 1, 2, 3 ]\n                                                     //];\n\narray([1, 2]).zip([2], [3]).value();                 //[\n                                                     //  [ 1, 2, 3 ],\n                                                     //  [2, null, null]\n                                                     //]\n\narray([1, 2, 3]).zip([ 4, 5, 6 ], b).value();        //[\n                                                     //  [1, 4, 7],\n                                                     //  [2, 5, 8],\n                                                     //  [3, 6, 9]\n                                                     //]\n\narray([1, 2]).zip([ 4, 5, 6 ],  [7, 8, 9 ]).value(); //[\n                                                     //  [1, 4, 7],\n                                                     //  [2, 5, 8]\n                                                     //]\n\narray([ 4, 5, 6 ]).zip([1, 2], [8]).value(),         //[\n                                                     //  [4, 1, 8],\n                                                     //  [5, 2, null],\n                                                     //  [6, null, null]\n                                                     //]\n\n\narray.zip([1], [2], [3]);                   //[\n                                            //  [ 1, 2, 3 ]\n                                            //]\n\narray.zip([1, 2], [2], [3]);                //[\n                                            //  [ 1, 2, 3 ],\n                                            //  [2, null, null]\n                                            //]\n\narray.zip([1, 2, 3], [4,5,6],  [7, 8, 9 ]); //[\n                                            //  [1, 4, 7],\n                                            //  [2, 5, 8],\n                                            //  [3, 6, 9]\n                                            //]\n\narray.zip([1, 2], [4,5,6],  [7, 8, 9 ]);    //[\n                                            //  [1, 4, 7],\n                                            //  [2, 5, 8]\n                                            //]\n\narray.zip([ 4, 5, 6 ], [1, 2], [8]);        //[\n                                            //  [4, 1, 8],\n                                            //  [5, 2, null],\n                                            //  [6, null, null]\n                                            //]\n\n```\n\n**`transpose`**\n\nTranspose a multi dimensional array.\n\n```javascript\narray([[1, 2, 3],[4, 5, 6]]).transpose().value();   //[ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ]\narray([[1, 2],[3, 4],[5, 6]]).transpose().value();  //[ [ 1, 3, 5 ], [ 2, 4, 6 ] ]\narray([[1],[3, 4],[5, 6]]).transpose().value();     //[ [1] ]\n\n\narray.transpose([[1, 2, 3],[4, 5, 6]]);             //[ [ 1, 4 ], [ 2, 5 ], [ 3, 6 ] ]\narray.transpose([[1, 2],[3, 4],[5, 6]]);            //[ [ 1, 3, 5 ], [ 2, 4, 6 ] ]\narray.transpose([[1],[3, 4],[5, 6]]);               //[ [1] ]\n```\n\n**`valuesAt`**\n\nGathers values and the specified indexes.\n\n```javascript\n\nvar arr = array([\"a\", \"b\", \"c\", \"d\"]);\narr.valuesAt(1, 2, 3).value();      //[\"b\", \"c\", \"d\"]\narr.valuesAt(1, 2, 3, 4).value();   //[\"b\", \"c\", \"d\", null]\narr.valuesAt(0, 3).value();         //[\"a\", \"d\"]\n\narr = [\"a\", \"b\", \"c\", \"d\"];\narray.valuesAt(arr, 1, 2, 3);       //[\"b\", \"c\", \"d\"]\narray.valuesAt(arr, 1, 2, 3, 4);    //[\"b\", \"c\", \"d\", null]\narray.valuesAt(arr, 0, 3);          //[\"a\", \"d\"]\n```\n\n**`union`**\n\nFinds the union of two arrays.\n\n```javascript\narray([\"a\", \"b\", \"c\"]).union([\"b\", \"c\", \"d\"]).value();  //[\"a\", \"b\", \"c\", \"d\"]);\narray([\"a\"]).union([\"b\"], [\"c\"], [\"d\"], [\"c\"]).value(); //[\"a\", \"b\", \"c\", \"d\"]);\n\narray.union([\"a\", \"b\", \"c\"], [\"b\", \"c\", \"d\"]);          //[\"a\", \"b\", \"c\", \"d\"]);\narray.union([\"a\"], [\"b\"], [\"c\"], [\"d\"], [\"c\"]);         //[\"a\", \"b\", \"c\", \"d\"]);\n```\n\n**`intersect`**\n\nFinds the intersection of two arrays.\n\n```javascript\narray([1, 2]).intersect([2, 3], [2, 3, 5]).value();                     //[2]);\narray([1, 2, 3]).intersect([2, 3, 4, 5], [2, 3, 5]).value();            //[2, 3]);\narray([1, 2, 3, 4]).intersect([2, 3, 4, 5], [2, 3, 4, 5]).value();      //[2, 3, 4]);\narray([1, 2, 3, 4, 5]).intersect([1, 2, 3, 4, 5], [1, 2, 3]).value();   //[1, 2, 3]);\narray([[1, 2, 3, 4, 5],[1, 2, 3, 4, 5],[1, 2, 3]]).intersect().value(); //[1, 2, 3]);\n\narray.intersect([1, 2], [2, 3], [2, 3, 5]);                             //[2]\narray.intersect([1, 2, 3], [2, 3, 4, 5], [2, 3, 5]);                    //[2, 3]\narray.intersect([1, 2, 3, 4], [2, 3, 4, 5], [2, 3, 4, 5]);              //[2, 3, 4]\narray.intersect([1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3]);           //[1, 2, 3]);\narray.intersect([[1, 2, 3, 4, 5],[1, 2, 3, 4, 5], [1, 2, 3]]);          //[1, 2, 3]);\n```\n\n**`powerSet`**\n\nFinds the powerset of a given array.\n\n```javascript\narray([1, 2, 3]).powerSet().value();\narray.powerSet([1, 2, 3]);\n//[\n//  [],\n//  [ 1 ],\n//  [ 2 ],\n//  [ 1, 2 ],\n//  [ 3 ],\n//  [ 1, 3 ],\n//  [ 2, 3 ],\n//  [ 1, 2, 3 ]\n//]\n```\n\n**`cartesian`**\n\nFinds the cartesian product of arrays.\n\n```javascript\narray([1, 2]).cartesian([2, 3]).value();\narray.cartesian([1, 2], [2, 3]);\n//[\n//  [1, 2],\n//  [1, 3],\n//  [2, 2],\n//  [2, 3]\n//]\n```\n\n**`compact`**\n\nCompacts the values of an array.\n\n```javascript\narray([1, null, null, x, 2]).compact().value(); //[1, 2]\n\narray([1, 2]).compact().value();  //[1, 2]\n\n\narray.compact([1, null, null, x, 2]); //[1, 2]\narray.compact([1, 2]); //[1, 2]\n```\n\n**`multiply`**\n\nRepoduces the values in an array the given number of times.\n\n```javascript\narray([1, 2]).multiply(2).value(); //[1, 2, 1, 2, 1, 2]\n\narray.multiply([1, 2, 3], 2); //[1, 2, 3, 1, 2, 3]\n```\n\n**`flatten`**\n\nFlatten multiple arrays into a single array.\n\n```javascript\n\narray([ [1], [2], [3] ]).flatten().value(); //[1, 2, 3]\n\narray.flatten([1, 2], [2, 3], [3, 4]); //[1, 2, 2, 3, 3, 4]\n\n```\n\n**`pluck`**\n\nPluck properties from values in an array.\n\n```javascript\nvar arr = [\n    {name: {first: \"Fred\", last: \"Jones\"}, age: 50, roles: [\"a\", \"b\", \"c\"]},\n    {name: {first: \"Bob\", last: \"Yukon\"}, age: 40, roles: [\"b\", \"c\"]},\n    {name: {first: \"Alice\", last: \"Palace\"}, age: 35, roles: [\"c\"]},\n    {name: {first: \"Johnny\", last: \"P.\"}, age: 56, roles: []}\n];\n\narray.pluck(arr, \"name.first\"); //[\"Fred\", \"Bob\", \"Alice\", \"Johnny\"]\narray(arr).pluck(\"age\"); //[50, 40, 35, 56]\n\n```\n\n**`invoke`**\n\nInvokes the specified method on each value in an array.\n\n```javascript\n\nfunction person(name, age) {\n    return {\n        getName: function () {\n            return name;\n        },\n\n        getOlder: function () {\n            age++;\n            return this;\n        },\n\n        getAge: function () {\n            return age;\n        }\n    };\n};\n\nvar arr = [person(\"Bob\", 40), person(\"Alice\", 35), person(\"Fred\", 50), person(\"Johnny\", 56)];\n\narray.invoke(arr, \"getName\"); //[\"Bob\", \"Alice\", \"Fred\", \"Johnny\"];\narray(arr).invoke(\"getName\").value(); //[\"Bob\", \"Alice\", \"Fred\", \"Johnny\"];\n\narray(arr).invoke(\"getOlder\").invoke(\"getAge\").value(); //[41, 36, 51, 57];\n```\n","_attachments":{},"homepage":"https://github.com/doug-martin/array-extended","bugs":{"url":"https://github.com/doug-martin/array-extended/issues"},"license":"MIT"}