{"_id":"@anonmily/collections","_rev":"9-6e29c20e13a298f7ca5fd857682cad40","name":"@anonmily/collections","description":"Representation of a collection of objects. Filter, sort, map, and query at will.","dist-tags":{"latest":"0.1.5"},"versions":{"0.0.6":{"name":"@anonmily/collections","version":"0.0.6","description":"Representation of a collection of objects. Filter, sort, map, and query at will.","main":"./es5","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+https://github.com/anonmily/react-complex-pagination.git"},"author":{"name":"Michelle Liu"},"license":"ISC","devDependencies":{"babel-core":"^6.18.2","babel-plugin-transform-class-properties":"^6.18.0","babel-polyfill":"^6.16.0","babel-preset-es2015":"^6.18.0","mocha-jsdom":"^1.1.0"},"dependencies":{"lodash":"^4.17.0","simply-is":"^2.5.8"},"gitHead":"b081c3d70bc53db138e546d8430ca0e016c89424","bugs":{"url":"https://github.com/anonmily/react-complex-pagination/issues"},"homepage":"https://github.com/anonmily/react-complex-pagination#readme","_id":"@anonmily/collections@0.0.6","_shasum":"c97dc359c7e5d3aa16e5c893220982fc40db65df","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"anonmily","email":"michelle@michelleliu.io"},"dist":{"shasum":"c97dc359c7e5d3aa16e5c893220982fc40db65df","tarball":"https://registry.npmjs.org/@anonmily/collections/-/collections-0.0.6.tgz","integrity":"sha512-zBIY8ZegYwhGOnRp3M1ua1mBWOG0msZBHH2tLRjS/IXs0hM5j/RjyYJ+u82MoewJrXrmfql0fvlURUOrFM0/7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCt/tPNgV+a8kr9Hfk2QRz5lVBy6alBR+A6058/CMTFQAIgfp5tIonsYN6JDsEI2VPhiY9awu2zea7cIvNONelq7G4="}]},"maintainers":[{"name":"anonmily","email":"michelle@michelleliu.io"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/collections-0.0.6.tgz_1479175437537_0.3597924041096121"}},"0.1.0":{"name":"@anonmily/collections","version":"0.1.0","description":"Representation of a collection of objects. Filter, sort, map, and query at will.","main":"./es5","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+https://github.com/anonmily/collections.git"},"author":{"name":"Michelle Liu"},"license":"ISC","devDependencies":{"babel-core":"^6.18.2","babel-plugin-transform-class-properties":"^6.18.0","babel-polyfill":"^6.16.0","babel-preset-es2015":"^6.18.0","mocha-jsdom":"^1.1.0"},"dependencies":{"lodash":"^4.17.0","simply-is":"^2.5.8"},"gitHead":"7a02d8d43a2ab33fb573ae110b2aa53c3c463583","bugs":{"url":"https://github.com/anonmily/collections/issues"},"homepage":"https://github.com/anonmily/collections#readme","_id":"@anonmily/collections@0.1.0","_shasum":"a2c5ab6e7feb36de587422423adbec21ecc574bb","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"anonmily","email":"michelle@michelleliu.io"},"dist":{"shasum":"a2c5ab6e7feb36de587422423adbec21ecc574bb","tarball":"https://registry.npmjs.org/@anonmily/collections/-/collections-0.1.0.tgz","integrity":"sha512-7d27triECItr0uWximWDK2xiVMLkdd5MNS+m9YE5IQkqaxttHu23eEpJPlZKtP1KG3iq96nNcKVv3Ev4iQcHKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGGeCRSLEoaPo6z+/gB2X9B2eQztB9Gr35/s/toHllatAiEAwM0v2T+J6K9uqQZERUze87wpSke4EViezi3+CHTCzCA="}]},"maintainers":[{"name":"anonmily","email":"michelle@michelleliu.io"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/collections-0.1.0.tgz_1479175646702_0.040265581803396344"}},"0.1.1":{"name":"@anonmily/collections","version":"0.1.1","description":"Representation of a collection of objects. Filter, sort, map, and query at will.","main":"./es5","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+https://github.com/anonmily/collections.git"},"author":{"name":"Michelle Liu"},"license":"ISC","devDependencies":{"babel-core":"^6.18.2","babel-plugin-transform-class-properties":"^6.18.0","babel-polyfill":"^6.16.0","babel-preset-es2015":"^6.18.0","mocha-jsdom":"^1.1.0"},"dependencies":{"lodash":"^4.17.0","simply-is":"^2.5.8"},"gitHead":"7ec7a90d8ca89314c237407c0a0f1a58f76f4db4","bugs":{"url":"https://github.com/anonmily/collections/issues"},"homepage":"https://github.com/anonmily/collections#readme","_id":"@anonmily/collections@0.1.1","_shasum":"ee37287b8ca7863e02d84b521c603b0d164a53a9","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"anonmily","email":"michelle@michelleliu.io"},"dist":{"shasum":"ee37287b8ca7863e02d84b521c603b0d164a53a9","tarball":"https://registry.npmjs.org/@anonmily/collections/-/collections-0.1.1.tgz","integrity":"sha512-drCgWyFIwPfk8WlFDkLkx1yFqJq5Sk9H9CPvLTR2x341uHHMWEV1E2RZfFjZPQ+T0O9Z+L8MfK8fJ4DZ46FPxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0b2JEg6l2pajQUeos0IGOfCyEIIzMYJpOdfILSW/dXgIgYpJX95gSqw5RbX3V20lHkdQFNwCEg57dYaDKqYKPG9w="}]},"maintainers":[{"name":"anonmily","email":"michelle@michelleliu.io"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/collections-0.1.1.tgz_1479176492591_0.5689056497067213"}},"0.1.2":{"name":"@anonmily/collections","version":"0.1.2","description":"Representation of a collection of objects. Filter, sort, map, and query at will.","main":"./es5","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+https://github.com/anonmily/collections.git"},"author":{"name":"Michelle Liu"},"license":"ISC","devDependencies":{"babel-core":"^6.18.2","babel-plugin-transform-class-properties":"^6.18.0","babel-polyfill":"^6.16.0","babel-preset-es2015":"^6.18.0","mocha-jsdom":"^1.1.0"},"dependencies":{"lodash":"^4.17.0","simply-is":"^2.5.8"},"gitHead":"a74ceaa58ed88263cb94aca3f23463e00597a547","bugs":{"url":"https://github.com/anonmily/collections/issues"},"homepage":"https://github.com/anonmily/collections#readme","_id":"@anonmily/collections@0.1.2","_shasum":"d0b0e0f81b39b8704e90b7c9cda40d4608380cf9","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"anonmily","email":"michelle@michelleliu.io"},"dist":{"shasum":"d0b0e0f81b39b8704e90b7c9cda40d4608380cf9","tarball":"https://registry.npmjs.org/@anonmily/collections/-/collections-0.1.2.tgz","integrity":"sha512-wAauoVg6GJGeU6DTUma1VmDJxmITL3mzPNFcoos97kBnrko3HBpeyEZTsMwKb1dtCoykEfwNLn6Oj8iy7DtGNQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBLzIn4i8RKhEpiQbD9lFywNdy7GDS+Bi1xok2V9KtAUAiEA6buXOuptc699iP+mkOo+VhSCJhRQ3mYz8Gd05XhBIh8="}]},"maintainers":[{"name":"anonmily","email":"michelle@michelleliu.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/collections-0.1.2.tgz_1479176533985_0.9853355560917407"}},"0.1.3":{"name":"@anonmily/collections","version":"0.1.3","description":"Representation of a collection of objects. Filter, sort, map, and query at will.","main":"./es5","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+https://github.com/anonmily/collections.git"},"author":{"name":"Michelle Liu"},"license":"ISC","devDependencies":{"babel-core":"^6.18.2","babel-plugin-transform-class-properties":"^6.18.0","babel-polyfill":"^6.16.0","babel-preset-es2015":"^6.18.0","mocha-jsdom":"^1.1.0"},"dependencies":{"lodash":"^4.17.0","simply-is":"^2.5.8"},"gitHead":"84670edd94a14a73d7a5434e9649085fa86021df","bugs":{"url":"https://github.com/anonmily/collections/issues"},"homepage":"https://github.com/anonmily/collections#readme","_id":"@anonmily/collections@0.1.3","_shasum":"3586b866049208bf77ccb8318c9ce1aebfcd8a0f","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"anonmily","email":"michelle@michelleliu.io"},"dist":{"shasum":"3586b866049208bf77ccb8318c9ce1aebfcd8a0f","tarball":"https://registry.npmjs.org/@anonmily/collections/-/collections-0.1.3.tgz","integrity":"sha512-IThhemnrl2VpFUhSGsOBwO/ZoG5AQLLgver8wPp/OvMIVI2T8XhK6oqWB+w6giHKYZyTFLLGkTYl9i5h1N1AZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUY0erzs6ab+JOyOx8+EDQFEbZ9V0U/8rqigA21hUWyAiEA9wJAw+Kf+ALBqOJQ6FkqDTKTsY+atAsIeovIRU/eS8Q="}]},"maintainers":[{"name":"anonmily","email":"michelle@michelleliu.io"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/collections-0.1.3.tgz_1479176771454_0.2468585567548871"}},"0.1.4":{"name":"@anonmily/collections","version":"0.1.4","description":"Representation of a collection of objects. Filter, sort, map, and query at will.","main":"./es5","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+https://github.com/anonmily/collections.git"},"author":{"name":"Michelle Liu"},"license":"ISC","devDependencies":{"babel-core":"^6.18.2","babel-plugin-transform-class-properties":"^6.18.0","babel-polyfill":"^6.16.0","babel-preset-es2015":"^6.18.0","chai":"^3.5.0","jsdom":"^9.9.1","mocha":"^3.2.0","mocha-jsdom":"^1.1.0"},"dependencies":{"lodash":"^4.17.0","simply-is":"^2.5.8"},"gitHead":"94260a15936c29dff728518e0c6bbd8a11c4cc58","bugs":{"url":"https://github.com/anonmily/collections/issues"},"homepage":"https://github.com/anonmily/collections#readme","_id":"@anonmily/collections@0.1.4","_shasum":"4de63e37ba2ad1f77fec8afddf99ded4c1ffe4c7","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"anonmily","email":"michelle@michelleliu.io"},"dist":{"shasum":"4de63e37ba2ad1f77fec8afddf99ded4c1ffe4c7","tarball":"https://registry.npmjs.org/@anonmily/collections/-/collections-0.1.4.tgz","integrity":"sha512-PQaIKfw+5aRU+FPxyZV8QQRsYVfcqzzFQMQwAgCh+XhlZOKUTW5BwmX/ENSnmXsl1a8kmPHjCNV2FZ7N3X8qYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiQ9bSXYX8QtQe8fvWzwP4nsSo4TjLvPRuMVn/n3GJeAIgPyQbwAYgJC8BL5p6DmZbE9q7LwCwL7mB8MvDIZNnh5A="}]},"maintainers":[{"name":"anonmily","email":"michelle@michelleliu.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/collections-0.1.4.tgz_1484085774896_0.749494151212275"}},"0.1.5":{"name":"@anonmily/collections","version":"0.1.5","description":"Representation of a collection of objects. Filter, sort, map, and query at will.","main":"./es5","scripts":{"test":"make test"},"repository":{"type":"git","url":"git+https://github.com/anonmily/collections.git"},"author":{"name":"Michelle Liu"},"license":"ISC","devDependencies":{"babel-core":"^6.18.2","babel-plugin-transform-class-properties":"^6.18.0","babel-polyfill":"^6.16.0","babel-preset-es2015":"^6.18.0","chai":"^3.5.0","jsdom":"^9.9.1","mocha":"^3.2.0","mocha-jsdom":"^1.1.0"},"dependencies":{"lodash":"^4.17.0","simply-is":"^2.5.8"},"gitHead":"c8bd47c7bf4aeb7d2b155617b6d8a2dbf9ea12d4","bugs":{"url":"https://github.com/anonmily/collections/issues"},"homepage":"https://github.com/anonmily/collections#readme","_id":"@anonmily/collections@0.1.5","_shasum":"fea329816ee2a7b0f27be7e1af4feee17241ea49","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"anonmily","email":"michelle@michelleliu.io"},"dist":{"shasum":"fea329816ee2a7b0f27be7e1af4feee17241ea49","tarball":"https://registry.npmjs.org/@anonmily/collections/-/collections-0.1.5.tgz","integrity":"sha512-Q3SWcURyE5C8Z6MRuMxx60a0cIVILG2/braiczr6TezHthxMgMYC+vuk3g8NKbHI7Yjvl+HFjz9Qe/aMZipgtA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVkt99IRQy9GqXTBT2iO85p3ARMb3+232wWuNIBu/rNwIgDzEtjM0s0ZQYhXg+bXPTaDu64avXZsR0rkmWAIIkVnk="}]},"maintainers":[{"name":"anonmily","email":"michelle@michelleliu.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/collections-0.1.5.tgz_1484602341582_0.3051598200108856"}}},"readme":"# Collection utilities\n\nRepresentation of a collection of objects.\n\n# Usage example\n\n```\nlet people = new Collection([\n\t{ name: 'john', age: 41 }, \n\t{ name: 'amy', age: 30 },\n\t{ name: 'harry', age: 4 } \n\t{ name: 'amy', age: 30 }\n])\n\n// Cloning, get unique elements only, filter, and sort\nlet adults = collection\n\t.clone()\n\t.unique()\n\t.filter( person => person.age > 21 )\n\t.sort({ name: 'asc' })\n```\n\nMapping is also supported.\n\n```\nlet ages = people.unique().map( x => x.age ).sort()\n\n// will return [4, 30, 41]\n```\n\n\nComplex filters can be used. \n\n```\npeople.filter([(x => x.age > 21), { name: 'amy' }]\n```\n\nWhen adding new data to a collection, it can be helpful to only add/update changes.\n\n```\nlet new_people = [\n\t{ name: 'john', age: 41 }\n\t{ name: 'anthony', age: 23 }\n]\n\npeople.merge( new_people, 'name' }\n\n```\n\nTo return the collection to its original state, when it was first declared, (e.g. to reset filters):\n\n```\npeople.reset()\n```\n","maintainers":[{"name":"anonmily","email":"michelle@michelleliu.io"}],"time":{"modified":"2022-06-12T14:42:52.605Z","created":"2016-11-15T02:03:59.291Z","0.0.6":"2016-11-15T02:03:59.291Z","0.1.0":"2016-11-15T02:07:28.481Z","0.1.1":"2016-11-15T02:21:34.385Z","0.1.2":"2016-11-15T02:22:14.202Z","0.1.3":"2016-11-15T02:26:13.111Z","0.1.4":"2017-01-10T22:02:55.161Z","0.1.5":"2017-01-16T21:32:21.820Z"},"homepage":"https://github.com/anonmily/collections#readme","repository":{"type":"git","url":"git+https://github.com/anonmily/collections.git"},"author":{"name":"Michelle Liu"},"bugs":{"url":"https://github.com/anonmily/collections/issues"},"license":"ISC","readmeFilename":"README.md"}