{"name":"array-tools","author":{"name":"Lloyd Brookes","email":"75pound@gmail.com"},"version":"1.4.3","description":"Useful functions for working with arrays","repository":{"type":"git","url":"https://github.com/75lb/array-tools.git"},"main":"./lib/array-tools.js","bin":{"array-tools":"bin/cli.js"},"license":"MIT","keywords":["pluck","arrayify","exists","where","findWhere","without","union","commonSequence","unique","spliceWhile"],"scripts":{"test":"tape test/*.js","lint":"jshint lib/*.js test/*.js; echo","docs":"jsdoc2md -t jsdoc2md/README.hbs -l js -d 1 --no-gfm lib/*.js > README.md; echo","watch":"baldrick --do 'npm run docs' --when lib/*.js --change"},"devDependencies":{"jsdoc-to-markdown":"~0.5.7","tape":"^3"},"dependencies":{"object-tools":"^1.1.0","typical":"^1.0.0"},"gitHead":"3376e2be28a9ca6fffeca9b0caf2867a454bfe73","bugs":{"url":"https://github.com/75lb/array-tools/issues"},"homepage":"https://github.com/75lb/array-tools","_id":"array-tools@1.4.3","_shasum":"23315e06c07955df1705c94b3a4ede42fa6c7ba8","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"75lb","email":"75pound@gmail.com"},"maintainers":[{"name":"75lb","email":"75pound@gmail.com"}],"dist":{"shasum":"23315e06c07955df1705c94b3a4ede42fa6c7ba8","tarball":"http://registry-npm.ywwl.com/array-tools/download/array-tools-1.4.3.tgz","integrity":"sha512-vn4vENSW0EgBDEGExIMbITDGu9kMPgOjtxaJNmnC7mb0FEFi+/GkEDIhhDk22VpgVwn2J7XvoyBvJN2Fo1D2lg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDjtXMUQlGCEWiWv56tfO6qywVCxX2jX44xzv0h8fyA9AiEA+Eiuc3DAfD3z1Ydw44Lchlz9WtCn3u1z6XPqu4VRPsI="}],"size":7580,"noattachment":false,"key":"/array-tools/-/array-tools-1.4.3.tgz"},"directories":{},"readme":"[![view on npm](http://img.shields.io/npm/v/array-tools.svg)](https://www.npmjs.org/package/array-tools)\n[![npm module downloads](http://img.shields.io/npm/dt/array-tools.svg)](https://www.npmjs.org/package/array-tools)\n[![Build Status](https://travis-ci.org/75lb/array-tools.svg?branch=master)](https://travis-ci.org/75lb/array-tools)\n[![Dependency Status](https://david-dm.org/75lb/array-tools.svg)](https://david-dm.org/75lb/array-tools)\n[![Coverage Status](https://coveralls.io/repos/75lb/array-tools/badge.svg?branch=master)](https://coveralls.io/r/75lb/array-tools?branch=master)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n# array-tools\nLightweight, use-anywhere toolkit for working with array data.\n\nThere are four ways to use it.\n\n1) As a command-line tool. E.g. array-tools downloads last month:\n```sh\n$ curl -s https://api.npmjs.org/downloads/range/last-month/array-tools \\\n| object-tools get downloads \\\n| array-tools pluck downloads \\\n| array-tools join \",\" \\\n| spark\n▂▅▃▅▅▁▁▃▄▃▆▂▂▁▁▂▄▃▃▁▁▂█▆▆▄▁▃▅▃\n```\n\n2) As a standard library, passing the input array on each method invocation:\n\n```js\n> var a = require(\"array-tools\");\n\n> var remainder = a.without([ 1, 2, 3, 4, 5 ], 1)\n> a.exists(remainder, 1)\nfalse\n```\n\n3) As a chainable method, passing the input array once then chaining from there:\n\n```js\n> a([ 1, 2, 3, 4, 5 ]).without(1).exists(1);\nfalse\n```\n\n4) As a base class.\n```js\nvar util = require(\"util\");\nvar ArrayTools = require(\"array-tools\");\n\n// this class will inherit all array-tools methods\nfunction CarCollection(cars){\n  ArrayTools.call(this, cars);\n}\nutil.inherits(CarCollection, ArrayTools);\n\nvar cars = new CarCollection([\n  { owner: \"Me\", model: \"Citreon Xsara\" },\n  { owner: \"Floyd\", model: \"Bugatti Veyron\" }\n]);\n\ncars.findWhere({ owner: \"Floyd\" });\n// returns { owner: \"Floyd\", model: \"Bugatti Veyron\" }\n```\n\n#### More on chaining\n* Each method returning an `Array` (e.g. `where`, `without`) can be chained.\n* Methods not returning an array (`exists`, `contains`) cannot be chained.\n* All methods from `Array.prototype` (e.g. `.join`, `.forEach` etc.) are also available in the chain. The same rules, regarding what can and cannot be chained, apply as above.\n* If the final operation in your chain is \"chainable\" (returns an array), append `.val()` to terminate the chain and retrieve the output.\n\n```js\n> a([ 1, 2, 2, 3 ]).exists(1)\ntrue\n> a([ 1, 2, 2, 3 ]).without(1).exists(1)\nfalse\n> a([ 1, 2, 2, 3 ]).without(1).unique().val()\n[ 2, 3 ]\n> a([ 1, 2, 2, 3 ]).without(1).unique().join(\"-\")\n'2-3'\n```\n\n## Install\nAs a library:\n\n```\n$ npm install array-tools --save\n```\n\nAs a command-line tool:\n```\n$ npm install -g array-tools\n```\n\nUsing bower:\n```\n$ bower install array-tools --save\n```\n\n## API Reference\n\n* [array-tools](#module_array-tools)\n    * _chainable_\n        * [.arrayify(any)](#module_array-tools.arrayify) ⇒ <code>Array</code>\n        * [.where(array, query)](#module_array-tools.where) ⇒ <code>Array</code>\n        * [.without(array, toRemove)](#module_array-tools.without) ⇒ <code>Array</code>\n        * [.pluck(recordset, property)](#module_array-tools.pluck) ⇒ <code>Array</code>\n        * [.pick(recordset, property)](#module_array-tools.pick) ⇒ <code>Array.&lt;object&gt;</code>\n        * [.unique(array)](#module_array-tools.unique) ⇒ <code>Array</code>\n        * [.spliceWhile(array, index, test, [...elementN])](#module_array-tools.spliceWhile) ⇒ <code>Array</code>\n        * [.extract(array, query)](#module_array-tools.extract) ⇒ <code>Array</code>\n        * [.flatten(array)](#module_array-tools.flatten) ⇒ <code>Array</code>\n        * [.sortBy()](#module_array-tools.sortBy) ⇒ <code>Array</code>\n    * _not chainable_\n        * [.exists(array, query)](#module_array-tools.exists) ⇒ <code>boolean</code>\n        * [.findWhere(recordset, query)](#module_array-tools.findWhere) ⇒ <code>\\*</code>\n        * [.remove(arr, toRemove)](#module_array-tools.remove) ⇒ <code>\\*</code>\n        * [.last(arr)](#module_array-tools.last) ⇒ <code>\\*</code>\n        * [.contains(array, value)](#module_array-tools.contains) ⇒ <code>boolean</code>\n\n<a name=\"module_array-tools.arrayify\"></a>\n### a.arrayify(any) ⇒ <code>Array</code>\nTakes any input and guarantees an array back.\n\n- converts array-like objects (e.g. `arguments`) to a real array\n- converts `undefined` to an empty array\n- converts any another other, singular value (including `null`) into an array containing that value\n- ignores input which is already an array\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| any | <code>\\*</code> | the input value to convert to an array |\n\n**Example**  \n```js\n> a.arrayify(undefined)\n[]\n\n> a.arrayify(null)\n[ null ]\n\n> a.arrayify(0)\n[ 0 ]\n\n> a.arrayify([ 1, 2 ])\n[ 1, 2 ]\n\n> function f(){ return a.arrayify(arguments); }\n> f(1,2,3)\n[ 1, 2, 3 ]\n```\n<a name=\"module_array-tools.where\"></a>\n### a.where(array, query) ⇒ <code>Array</code>\nDeep query an array.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| array | <code>Array.&lt;object&gt;</code> | the array to query |\n| query | <code>any</code> &#124; <code>Array.&lt;any&gt;</code> | one or more queries |\n\n**Example**  \nSay you have a recordset:\n```js\n> data = [\n    { name: \"Dana\", age: 30 },\n    { name: \"Yana\", age: 20 },\n    { name: \"Zhana\", age: 10 }\n]\n```\n\nYou can return records with properties matching an exact value:\n```js\n> a.where(data, { age: 10 })\n[ { name: 'Zhana', age: 10 } ]\n```\n\nor where NOT the value (prefix the property name with `!`)\n```js\n> a.where(data, { \"!age\": 10 })\n[ { name: 'Dana', age: 30 }, { name: 'Yana', age: 20 } ]\n```\n\nmatch using a function:\n```js\n> function over10(age){ return age > 10; }\n> a.where(data, { age: over10 })\n[ { name: 'Dana', age: 30 }, { name: 'Yana', age: 20 } ]\n```\n\nmatch using a regular expression\n```js\n> a.where(data, { name: /ana/ })\n[ { name: 'Dana', age: 30 },\n  { name: 'Yana', age: 20 },\n  { name: 'Zhana', age: 10 } ]\n```\n\nYou can query to any arbitrary depth. So with deeper data, like this:\n```js\n> deepData = [\n    { name: \"Dana\", favourite: { colour: \"light red\" } },\n    { name: \"Yana\", favourite: { colour: \"dark red\" } },\n    { name: \"Zhana\", favourite: { colour: [ \"white\", \"red\" ] } }\n]\n```\n\nget records with `favourite.colour` values matching `/red/`\n```js\n> a.where(deepData, { favourite: { colour: /red/ } })\n[ { name: 'Dana', favourite: { colour: 'light red' } },\n  { name: 'Yana', favourite: { colour: 'dark red' } } ]\n```\n\nif the value you're looking for _maybe_ part of an array, prefix the property name with `+`. Now Zhana is included:\n```js\n> a.where(deepData, { favourite: { \"+colour\": /red/ } })\n[ { name: 'Dana', favourite: { colour: 'light red' } },\n  { name: 'Yana', favourite: { colour: 'dark red' } },\n  { name: 'Zhana', favourite: { colour: [ \"white\", \"red\" ] } } ]\n```\n\nyou can combine any of the above by supplying an array of queries. Records will be returned if _any_ of the queries match:\n```js\n> var nameBeginsWithY = { name: /^Y/ }\n> var faveColourIncludesWhite = { favourite: { \"+colour\": \"white\" } }\n\n> a.where(deepData, [ nameBeginsWithY, faveColourIncludesWhite ])\n[ { name: 'Yana', favourite: { colour: 'dark red' } },\n  { name: 'Zhana', favourite: { colour: [ \"white\", \"red\" ] } } ]\n```\n<a name=\"module_array-tools.without\"></a>\n### a.without(array, toRemove) ⇒ <code>Array</code>\nReturns a new array with the same content as the input minus the specified values. It accepts the same query syntax as [where](#module_array-tools.where).\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| array | <code>Array</code> | the input array |\n| toRemove | <code>any</code> &#124; <code>Array.&lt;any&gt;</code> | one, or more queries |\n\n**Example**  \n```js\n> a.without([ 1, 2, 3 ], 2)\n[ 1, 3 ]\n\n> a.without([ 1, 2, 3 ], [ 2, 3 ])\n[ 1 ]\n\n> data = [\n    { name: \"Dana\", age: 30 },\n    { name: \"Yana\", age: 20 },\n    { name: \"Zhana\", age: 10 }\n]\n> a.without(data, { name: /ana/ })\n[]\n```\n<a name=\"module_array-tools.pluck\"></a>\n### a.pluck(recordset, property) ⇒ <code>Array</code>\nReturns an array containing each value plucked from the specified property of each object in the input array.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| recordset | <code>Array.&lt;object&gt;</code> | The input recordset |\n| property | <code>string</code> &#124; <code>Array.&lt;string&gt;</code> | Property name, or an array of property names. If an array is supplied, the first existing property will be returned. |\n\n**Example**  \nwith this data..\n```js\n> var data = [\n    { name: \"Pavel\", nick: \"Pasha\" },\n    { name: \"Richard\", nick: \"Dick\" },\n    { name: \"Trevor\" },\n]\n```\n\npluck all the nicknames\n```js\n> a.pluck(data, \"nick\")\n[ 'Pasha', 'Dick' ]\n```\n\nin the case no nickname exists, take the name instead:\n```js\n> a.pluck(data, [ \"nick\", \"name\" ])\n[ 'Pasha', 'Dick', 'Trevor' ]\n```\n\nthe values being plucked can be at any depth:\n```js\n> var data = [\n    { leeds: { leeds: { leeds: \"we\" } } },\n    { leeds: { leeds: { leeds: \"are\" } } },\n    { leeds: { leeds: { leeds: \"Leeds\" } } }\n]\n\n> a.pluck(data, \"leeds.leeds.leeds\")\n[ 'we', 'are', 'Leeds' ]\n```\n<a name=\"module_array-tools.pick\"></a>\n### a.pick(recordset, property) ⇒ <code>Array.&lt;object&gt;</code>\nreturn a copy of the input `recordset` containing objects having only the cherry-picked properties\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| recordset | <code>Array.&lt;object&gt;</code> | the input |\n| property | <code>string</code> &#124; <code>Array.&lt;string&gt;</code> | the properties to include in the result |\n\n**Example**  \nwith this data..\n```js\n> data = [\n    { name: \"Dana\", age: 30 },\n    { name: \"Yana\", age: 20 },\n    { name: \"Zhana\", age: 10 }\n]\n```\n\nreturn only the `\"name\"` field..\n```js\n> a.pick(data, \"name\")\n[ { name: 'Dana' }, { name: 'Yana' }, { name: 'Zhana' } ]\n```\n\nreturn both the `\"name\"` and `\"age\"` fields\n```js\n> a.pick(data, [ \"name\", \"age\" ])\n[ { name: 'Dana', age: 30 },\n  { name: 'Yana', age: 20 },\n  { name: 'Zhana', age: 10 } ]\n```\n\ncherry-picks fields at any depth:\n```js\n> data = [\n    { person: { name: \"Dana\", age: 30 }},\n    { person: { name: \"Yana\", age: 20 }},\n    { person: { name: \"Zhana\", age: 10 }}\n]\n\n> a.pick(data, \"person.name\")\n[ { name: 'Dana' }, { name: 'Yana' }, { name: 'Zhana' } ]\n\n> a.pick(data, \"person.age\")\n[ { age: 30 }, { age: 20 }, { age: 10 } ]\n```\n<a name=\"module_array-tools.unique\"></a>\n### a.unique(array) ⇒ <code>Array</code>\nReturns an array containing the unique values from the input array.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| array | <code>Array</code> | input array |\n\n**Example**  \n```js\n> a.unique([ 1, 6, 6, 7, 1])\n[ 1, 6, 7 ]\n```\n<a name=\"module_array-tools.spliceWhile\"></a>\n### a.spliceWhile(array, index, test, [...elementN]) ⇒ <code>Array</code>\nSplice items from the input array until the matching test fails. Returns an array containing the items removed.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| array | <code>Array</code> | the input array |\n| index | <code>number</code> | the position to begin splicing from |\n| test | <code>any</code> | the sequence of items passing this test will be removed |\n| [...elementN] | <code>\\*</code> | elements to add to the array in place |\n\n**Example**  \n```js\n> function under10(n){ return n < 10; }\n> numbers = [ 1, 2, 4, 6, 12 ]\n\n> a.spliceWhile(numbers, 0, under10)\n[ 1, 2, 4, 6 ]\n> numbers\n[ 12 ]\n\n> countries = [ \"Egypt\", \"Ethiopia\", \"France\", \"Argentina\" ]\n\n> a.spliceWhile(countries, 0, /^e/i)\n[ 'Egypt', 'Ethiopia' ]\n> countries\n[ 'France', 'Argentina' ]\n```\n<a name=\"module_array-tools.extract\"></a>\n### a.extract(array, query) ⇒ <code>Array</code>\nRemoves items from `array` which satisfy the query. Modifies the input array, returns the extracted.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Returns**: <code>Array</code> - the extracted items.  \n**Category**: chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| array | <code>Array</code> | the input array, modified directly |\n| query | <code>any</code> | if an item in the input array passes this test it is removed |\n\n**Example**  \n```js\n> DJs = [\n    { name: \"Trevor\", sacked: true },\n    { name: \"Mike\", sacked: true },\n    { name: \"Chris\", sacked: false },\n    { name: \"Alan\", sacked: false }\n]\n\n> a.extract(DJs, { sacked: true })\n[ { name: 'Trevor', sacked: true },\n  { name: 'Mike', sacked: true } ]\n\n> DJs\n[ { name: 'Chris', sacked: false },\n  { name: 'Alan', sacked: false } ]\n```\n<a name=\"module_array-tools.flatten\"></a>\n### a.flatten(array) ⇒ <code>Array</code>\nflatten an array of arrays into a single array.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: chainable  \n**Since**: 1.4.0  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| array | <code>Array</code> | the input array |\n\n**Example**  \n```js\n> numbers = [ 1, 2, [ 3, 4 ], 5 ]\n> a.flatten(numbers)\n[ 1, 2, 3, 4, 5 ]\n```\n<a name=\"module_array-tools.sortBy\"></a>\n### a.sortBy() ⇒ <code>Array</code>\nSort an array of objects by one or more fields\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: chainable  \n**Since**: 1.5.0  \n\n| Type | Description |\n| --- | --- |\n| <code>Array.&lt;object&gt;</code> | input array |\n| <code>string</code> &#124; <code>Array.&lt;string&gt;</code> | column name(s) to sort by |\n| <code>object</code> | specific sort orders, per columns |\n\n**Example**  \nwith this data\n```js\n> DJs = [\n    { name: \"Trevor\", slot: \"twilight\" },\n    { name: \"Chris\", slot: \"twilight\" },\n    { name: \"Mike\", slot: \"afternoon\" },\n    { name: \"Rodney\", slot: \"morning\" },\n    { name: \"Chris\", slot: \"morning\" },\n    { name: \"Zane\", slot: \"evening\" }\n]\n```\n\nsort by `slot` using the default sort order\n```js\n> a.sortBy(DJs, \"slot\")\n[ { name: 'Mike', slot: 'afternoon' },\n  { name: 'Zane', slot: 'evening' },\n  { name: 'Chris', slot: 'morning' },\n  { name: 'Rodney', slot: 'morning' },\n  { name: 'Chris', slot: 'twilight' },\n  { name: 'Trevor', slot: 'twilight' } ]\n```\n\nspecify a custom sort order for `slot`\n```js\n> a.sortBy(DJs, \"slot\", { slot: [ \"morning\", \"afternoon\", \"evening\", \"twilight\" ]})\n[ { name: 'Rodney', slot: 'morning' },\n  { name: 'Chris', slot: 'morning' },\n  { name: 'Mike', slot: 'afternoon' },\n  { name: 'Zane', slot: 'evening' },\n  { name: 'Trevor', slot: 'twilight' },\n  { name: 'Chris', slot: 'twilight' } ]\n```\n\nsort by `slot` then `name`\n```js\n> a.sortBy(DJs, [\"slot\", \"name\"], { slot: [ \"morning\", \"afternoon\", \"evening\", \"twilight\" ]})\n[ { name: 'Chris', slot: 'morning' },\n  { name: 'Rodney', slot: 'morning' },\n  { name: 'Mike', slot: 'afternoon' },\n  { name: 'Zane', slot: 'evening' },\n  { name: 'Chris', slot: 'twilight' },\n  { name: 'Trevor', slot: 'twilight' } ]\n```\n<a name=\"module_array-tools.exists\"></a>\n### a.exists(array, query) ⇒ <code>boolean</code>\nWorks in exactly the same way as [where](#module_array-tools.where) but returning a boolean indicating whether a matching record exists.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: not chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| array | <code>Array</code> | the array to search |\n| query | <code>\\*</code> | the value to search for |\n\n**Example**  \n```js\n> data = [\n    { name: \"Dana\", age: 30 },\n    { name: \"Yana\", age: 20 },\n    { name: \"Zhana\", age: 10 }\n]\n\n> a.exists(data, { age: 10 })\ntrue\n```\n<a name=\"module_array-tools.findWhere\"></a>\n### a.findWhere(recordset, query) ⇒ <code>\\*</code>\nWorks in exactly the same way as [where](#module_array-tools.where) but returns only the first item found.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: not chainable  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| recordset | <code>Array.&lt;object&gt;</code> | the array to search |\n| query | <code>object</code> | the search query |\n\n**Example**  \n```js\n> dudes = [\n    { name: 'Jim', age: 8 },\n    { name: 'Clive', age: 8 },\n    { name: 'Hater', age: 9 }\n]\n\n> a.findWhere(dudes, { age: 8 })\n{ name: 'Jim', age: 8 }\n```\n<a name=\"module_array-tools.remove\"></a>\n### a.remove(arr, toRemove) ⇒ <code>\\*</code>\nRemoves the specified value from the input array.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: not chainable  \n**Since**: 1.8.0  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| arr | <code>Array</code> | the input array |\n| toRemove | <code>\\*</code> | the item to remove |\n\n**Example**  \n```js\n> numbers = [ 1, 2, 3 ]\n> a.remove(numbers, 1)\n[ 1 ]\n\n> numbers\n[ 2, 3 ]\n```\n<a name=\"module_array-tools.last\"></a>\n### a.last(arr) ⇒ <code>\\*</code>\nReturn the last item in an array.\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: not chainable  \n**Since**: 1.7.0  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| arr | <code>Array</code> | the input array |\n\n<a name=\"module_array-tools.contains\"></a>\n### a.contains(array, value) ⇒ <code>boolean</code>\nSearches the array for the exact value supplied (strict equality). To query for value existance using an expression or function, use [exists](#module_array-tools.exists). If you pass an array of values, contains will return true if they _all_ exist. (note: `exists` returns true if _some_ of them exist).\n\n**Kind**: static method of <code>[array-tools](#module_array-tools)</code>  \n**Category**: not chainable  \n**Since**: 1.8.0  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| array | <code>Array</code> | the input array |\n| value | <code>\\*</code> | the value to look for |\n\n\n* * *\n\n&copy; 2015-16 Lloyd Brookes <75pound@gmail.com>. Documented by [jsdoc-to-markdown](https://github.com/75lb/jsdoc-to-markdown).\n","publish_time":1423439903212,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","_cnpm_publish_time":1423439903212,"dist-tags":{"latest":"2.0.9"}}