{"_id":"cp-data","_rev":"167057","name":"cp-data","description":"cp-data is a JavaScript library for some common data structures","dist-tags":{"latest":"1.1.3"},"maintainers":[{"name":"cpettitt","email":"cpettitt@gmail.com"}],"time":{"modified":"2021-06-03T11:47:12.000Z","created":"2013-10-15T14:14:08.996Z","1.1.3":"2014-01-31T04:03:51.545Z","1.1.2":"2014-01-10T01:44:41.451Z","1.1.1":"2013-12-20T19:37:57.921Z","1.1.0":"2013-10-15T14:14:08.996Z"},"users":{},"author":{"name":"Chris Pettitt","email":"chris@samsarin.com"},"repository":{"type":"git","url":"https://github.com/cpettitt/cp-data.git"},"versions":{"1.1.3":{"name":"cp-data","version":"1.1.3","description":"cp-data is a JavaScript library for some common data structures","main":"index.js","keywords":["set","priority queue","data structure"],"devDependencies":{"benchmark":"~1.0.0","browserify":"~2.33.1","chai":"1.7.x","jshint":"2.1.x","istanbul":"~0.1.44","mocha":"1.12.x","semver":"2.1.x","uglify-js":"1.2.3"},"author":{"name":"Chris Pettitt","email":"chris@samsarin.com"},"repository":{"type":"git","url":"https://github.com/cpettitt/cp-data.git"},"license":"MIT","bugs":{"url":"https://github.com/cpettitt/cp-data/issues"},"homepage":"https://github.com/cpettitt/cp-data","_id":"cp-data@1.1.3","dist":{"shasum":"b705f637992db68f37e2d48de525b1d66dd5b372","size":5826,"noattachment":false,"key":"/cp-data/-/cp-data-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/cp-data/download/cp-data-1.1.3.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"cpettitt","email":"cpettitt@gmail.com"},"maintainers":[{"name":"cpettitt","email":"cpettitt@gmail.com"}],"directories":{},"publish_time":1391141031545,"_cnpm_publish_time":1391141031545,"_hasShrinkwrap":false},"1.1.2":{"name":"cp-data","version":"1.1.2","description":"cp-data is a JavaScript library for some common data structures","main":"index.js","keywords":["set","priority queue","data structure"],"devDependencies":{"benchmark":"~1.0.0","browserify":"~2.33.1","chai":"1.7.x","jshint":"2.1.x","istanbul":"~0.1.44","mocha":"1.12.x","semver":"2.1.x","uglify-js":"1.2.3"},"author":{"name":"Chris Pettitt","email":"chris@samsarin.com"},"repository":{"type":"git","url":"https://github.com/cpettitt/cp-data.git"},"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/cpettitt/cp-data/issues"},"homepage":"https://github.com/cpettitt/cp-data","_id":"cp-data@1.1.2","dist":{"shasum":"6a83a11c7dc1053a88f5cd7c3dd7418eae150a8c","size":5144,"noattachment":false,"key":"/cp-data/-/cp-data-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/cp-data/download/cp-data-1.1.2.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"cpettitt","email":"cpettitt@gmail.com"},"maintainers":[{"name":"cpettitt","email":"cpettitt@gmail.com"}],"directories":{},"publish_time":1389318281451,"_cnpm_publish_time":1389318281451,"_hasShrinkwrap":false},"1.1.1":{"name":"cp-data","version":"1.1.1","description":"cp-data is a JavaScript library for some common data structures","main":"index.js","keywords":["set","priority queue","data structure"],"config":{"blanket":{"pattern":"lib","data-cover-never":["node_modules","test"]}},"devDependencies":{"benchmark":"~1.0.0","blanket":"1.x.x","browserify":"~2.35.1","chai":"1.7.x","grunt":"~0.4.1","grunt-browserify":"~1.2.8","grunt-contrib-copy":"~0.4.1","grunt-contrib-jshint":"~0.6.4","grunt-contrib-uglify":"~0.2.4","grunt-contrib-watch":"~0.5.3","grunt-mocha-cov":"0.0.7","mocha":"1.12.x","semver":"2.1.x","uglify-js":"1.2.3"},"author":{"name":"Chris Pettitt","email":"chris@samsarin.com"},"repository":{"type":"git","url":"https://github.com/cpettitt/cp-data.git"},"license":"MIT","readmeFilename":"README.md","_id":"cp-data@1.1.1","dist":{"shasum":"b0e9121fbd36fbab134e3faa9623db807995e5bb","size":6110,"noattachment":false,"key":"/cp-data/-/cp-data-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/cp-data/download/cp-data-1.1.1.tgz"},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"cpettitt","email":"cpettitt@gmail.com"},"maintainers":[{"name":"cpettitt","email":"cpettitt@gmail.com"}],"directories":{},"publish_time":1387568277921,"_cnpm_publish_time":1387568277921,"_hasShrinkwrap":false},"1.1.0":{"name":"cp-data","version":"1.1.0","description":"cp-data is a JavaScript library for some common data structures","main":"index.js","keywords":["set","priority queue","data structure"],"scripts":{},"devDependencies":{"benchmark":"~1.0.0","blanket":"1.x.x","browserify":"~2.33.1","chai":"1.7.x","grunt":"~0.4.1","grunt-browserify":"~1.2.8","grunt-contrib-copy":"~0.4.1","grunt-contrib-jshint":"~0.6.4","grunt-contrib-uglify":"~0.2.4","grunt-contrib-watch":"~0.5.3","grunt-mocha-cov":"0.0.7","mocha":"1.12.x","semver":"2.1.x","uglify-js":"1.2.3"},"author":{"name":"Chris Pettitt","email":"chris@samsarin.com"},"repository":{"type":"git","url":"https://github.com/cpettitt/cp-data.git"},"license":"MIT","readmeFilename":"README.md","bugs":{"url":"https://github.com/cpettitt/cp-data/issues"},"_id":"cp-data@1.1.0","dist":{"shasum":"db9bc65b518bf8baa4cc948606ac180ab1ba0b1a","size":6107,"noattachment":false,"key":"/cp-data/-/cp-data-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/cp-data/download/cp-data-1.1.0.tgz"},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"cpettitt","email":"chris@samsarin.com"},"maintainers":[{"name":"cpettitt","email":"cpettitt@gmail.com"}],"directories":{},"publish_time":1381846448996,"_cnpm_publish_time":1381846448996,"_hasShrinkwrap":false}},"readme":"# cp-data\n\ncp-data is a JavaScript library for some common data structures. Currently this\nincludes a fast Set implementation and a PriorityQueue.\n\n[![Build Status](https://secure.travis-ci.org/cpettitt/cp-data.png)](http://travis-ci.org/cpettitt/cp-data)\n\n# Getting cp-data\n\n## NPM Install\n\nBefore installing this library you need to install the [npm package manager].\n\nTo get cp-data from npm, use:\n\n    $ npm install cp-data\n\n## Browser Scripts\n\nYou can get the latest browser-ready scripts:\n\n* [cp-data.js](http://cpettitt.github.io/project/cp-data/latest/cp-data.js)\n* [cp-data.min.js](http://cpettitt.github.io/project/cp-data/latest/cp-data.min.js)\n\n## Build From Source\n\nBefore building this library you need to install the [npm package manager].\n\nCheck out this project and run this command from the root of the project:\n\n    $ make\n\nThis will generate `cp-data.js` and `cp-data.min.js` in the `out/dist` directory\nof the project.\n\n# Set Example\n\n```js\nvar Set = require('cp-data').Set;\n\nvar s1 = new Set();\n\ns1.has(1);\n// => false\n\ns1.add(1);\n// => true\n\ns1.size();\n// => 1\n\ns1.has(1);\n// => true\n\n// Addind a key that is already in the set does not change the set. The\n// function returns `false` to indicate nothing changed.\ns1.add(1);\n// => false\n\ns1.size();\n// => 1\n\ns1.add(2);\ns1.size();\n// => 2\n\n// We can construct a set from an array\nvar s2 = new Set([2, 3, 4]);\n\ns2.keys();\n// => [2, 3, 4]\n\n// Intersection:\nSet.intersect([s1, s2]).keys();\n// => [2]\n\n// Union:\nSet.union([s1, s2]).keys();\n// => [1, 2, 3, 4]\n\n// We can also do set intersection / union with arrays:\nSet.intersect([[1, 2, 3], [2, 3, 4]]).keys();\n// => [2, 3]\n\n// We can do set intersection / union with more that 2 sets:\nSet.union([s1, s2, ['a', 'b', 'c']]).keys();\n// => [1, 2, 3, 4, 'a', 'b', 'c']\n\n// Lastly, sets preserve the type of the key supplied. Compare the following 2\n// results:\nnew Set([1]).keys();\n// => [1]\nnew Set(['1']).keys();\n// => ['1']\n```\n\n# License\n\ncp-data is licensed under the terms of the MIT License. See the LICENSE file\nfor details.\n\n[npm package manager]: http://npmjs.org/\n","_attachments":{},"homepage":"https://github.com/cpettitt/cp-data","bugs":{"url":"https://github.com/cpettitt/cp-data/issues"},"license":"MIT"}