{"name":"unique-concat","version":"0.2.2","description":"Concatenates two arrays, removing duplicates in the process and returns one array with unique values.","main":"index.js","scripts":{"test-main":"tap test/*.js","test-0.8":"nave use 0.8 npm run test-main","test-0.10":"nave use 0.10 npm run test-main","test-all":"npm run test-main && npm run test-0.8 && npm run test-0.10","test":"if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi","tape":"testling -x open"},"repository":{"type":"git","url":"git://github.com/thlorenz/unique-concat.git"},"homepage":"https://github.com/thlorenz/unique-concat","dependencies":{},"devDependencies":{"nave":"~0.4.3","tape":"~1.0.4","tap":"~0.4.3","testling":"~1.5.1"},"keywords":["concat","concatenate","Array","unique","duplicates","hash"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/unique-concat/blob/master/LICENSE"},"engine":{"node":">=0.6"},"testling":{"files":"test/*.js","browsers":["ie/9..latest","firefox/17..latest","firefox/nightly","chrome/22..latest","chrome/canary","opera/12..latest","opera/next","safari/6.0.latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"readme":"# unique-concat [![build status](https://secure.travis-ci.org/thlorenz/unique-concat.png)](http://travis-ci.org/thlorenz/unique-concat)\n\n[![testling badge](https://ci.testling.com/thlorenz/unique-concat.png)](https://ci.testling.com/thlorenz/unique-concat)\n\nConcatenates two arrays, removing duplicates in the process and returns one array with unique values.\n\n```js\nvar concat = require('unique-concat');\nvar res = concat([ 1, 2, 3 ], [ 1, 2, 3, 4, 5, 6])\nconsole.log(res);\n// => [1, 2, 3, 4, 5, 6]\n```\n\n## Installation\n\n    npm install unique-concat\n\n## API\n\n###*function uniqueConcat(arr1, arr2[, identity])*\n```\n/**\n * Concatenates two arrays, removing duplicates in the process and returns one array with unique values.\n * In case the elements in the array don't have a proper built in way to determine their identity,\n * a custom identity function must be provided.\n *\n * As an example, {Object}s all return '[ 'object' ]' when .toString()ed and therefore require a custom\n * identity function.\n *\n * @name exports\n * @function unique-concat\n * @param arr1 {Array} first batch of elements\n * @param arr2 {Array} second batch of elements\n * @param identity {Function} (optional) supply an alternative way to get an element's identity\n */\n```\n\n## Identity function example\n\n```js\nvar identity = function (obj) { return obj.a; }\nvar res = concat([{ a: 1 }, { a: 2, b: 1}], [{ a: 2, b: 2 }, { a: 3 }], identity);\nconsole.log(res);\n// => [ { a: 1 }, { a: 2, b: 2 }, { a: 3 } ]\n```\n\nFor more examples see [tests](https://github.com/thlorenz/unique-concat/blob/master/test/index.js)\n\n## License\n\nMIT\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/thlorenz/unique-concat/issues"},"_id":"unique-concat@0.2.2","dist":{"shasum":"9210f9bdcaacc5e1e3929490d7c019df96f18712","tarball":"http://registry-npm.ywwl.com/unique-concat/download/unique-concat-0.2.2.tgz","integrity":"sha512-nFT3frbsvTa9rrc71FJApPqXF8oIhVHbX3IWgObQi1mF7WrW48Ys70daL7o4evZUtmUf6Qn6WK0LbHhyO0hpXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFXdkATkIrxGDmfWTA8WnWtpprnH3mnTNOiONQI9YKBJAiB2LFTpkwigOVIPyZnY2gw9wF+LGJoX/gV/E21pnlN9zQ=="}],"size":3128,"noattachment":false,"key":"/unique-concat/-/unique-concat-0.2.2.tgz"},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"directories":{},"publish_time":1375025628369,"_cnpm_publish_time":1375025628369,"dist-tags":{"latest":"0.2.2"}}