{"_id":"sorted-array","_rev":"3630729","name":"sorted-array","description":"An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.","dist-tags":{"latest":"2.0.4"},"maintainers":[{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"}],"time":{"modified":"2024-10-21T04:09:00.000Z","created":"2013-05-01T12:47:07.059Z","2.0.4":"2019-03-01T07:07:16.061Z","2.0.3":"2019-03-01T07:02:09.816Z","2.0.2":"2018-01-17T03:43:12.747Z","2.0.1":"2015-01-17T03:09:52.129Z","2.0.0":"2015-01-16T03:36:15.356Z","1.1.1":"2014-03-28T14:28:14.989Z","1.1.0":"2013-05-01T12:50:17.529Z","1.0.0":"2013-05-01T12:47:07.059Z"},"users":{},"author":{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"},"repository":{"type":"git","url":"git+https://github.com/aaditmshah/sorted-array.git"},"versions":{"2.0.4":{"name":"sorted-array","description":"An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.","version":"2.0.4","keywords":["sorted","array","Neumann","insertion","sort","insert","binary","search","deletion","delete"],"author":{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"},"main":"sorted-array.js","maintainers":[{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"}],"contributors":[{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"}],"bugs":{"url":"https://github.com/aaditmshah/sorted-array/issues"},"licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"repositories":[{"type":"git","url":"git+https://github.com/aaditmshah/sorted-array.git"}],"dependencies":{},"homepage":"https://github.com/aaditmshah/sorted-array","gitHead":"71887435e738b714af3b6c160500c168ee7df7a5","repository":{"type":"git","url":"git+https://github.com/aaditmshah/sorted-array.git"},"_id":"sorted-array@2.0.4","_nodeVersion":"11.10.0","_npmVersion":"6.8.0","dist":{"shasum":"5d62bbfe64d1bde3cf4b6b79530a6feb95afb5ae","size":2992,"noattachment":false,"key":"/sorted-array/-/sorted-array-2.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/sorted-array/download/sorted-array-2.0.4.tgz"},"_npmUser":{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sorted-array_2.0.4_1551424035850_0.7675117172663606"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T02:08:20.944Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1551424036061,"_cnpm_publish_time":1551424036061},"2.0.3":{"name":"sorted-array","description":"An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.","version":"2.0.3","keywords":["sorted","array","Neumann","insertion","sort","insert","binary","search","deletion","delete"],"author":{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"},"main":"sorted-array.js","maintainers":[{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"}],"contributors":[{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"}],"bugs":{"url":"https://github.com/aaditmshah/sorted-array/issues"},"licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"repositories":[{"type":"git","url":"git+https://github.com/aaditmshah/sorted-array.git"}],"dependencies":{},"homepage":"https://github.com/aaditmshah/sorted-array","gitHead":"286016876ac47ff8f9102f5f91ae8041449697cc","repository":{"type":"git","url":"git+https://github.com/aaditmshah/sorted-array.git"},"_id":"sorted-array@2.0.3","_nodeVersion":"11.10.0","_npmVersion":"6.8.0","dist":{"shasum":"825d2954d10e3c5246d3d0961355f612ee42cdc3","size":2485,"noattachment":false,"key":"/sorted-array/-/sorted-array-2.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/sorted-array/download/sorted-array-2.0.3.tgz"},"_npmUser":{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sorted-array_2.0.3_1551423729659_0.4591695648546439"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T02:08:20.858Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1551423729816,"_cnpm_publish_time":1551423729816},"2.0.2":{"name":"sorted-array","description":"An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.","version":"2.0.2","keywords":["sorted","array","Neumann","insertion","sort","insert","binary","search","deletion","delete"],"author":{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"},"main":"sorted-array.js","maintainers":[{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"}],"contributors":[{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"}],"bugs":{"url":"https://github.com/javascript/sorted-array/issues"},"licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"repositories":[{"type":"git","url":"git+https://github.com/javascript/sorted-array.git"}],"dependencies":{},"homepage":"https://github.com/javascript/sorted-array","gitHead":"86c54e88b574056c2bf4532a771abc1ea22f6ed3","repository":{"type":"git","url":"git+https://github.com/javascript/sorted-array.git"},"_id":"sorted-array@2.0.2","_npmVersion":"5.6.0","_nodeVersion":"9.3.0","_npmUser":{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"},"dist":{"shasum":"b55123483a243e965adc79cc14c5160464d91d86","size":2504,"noattachment":false,"key":"/sorted-array/-/sorted-array-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/sorted-array/download/sorted-array-2.0.2.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sorted-array-2.0.2.tgz_1516160592679_0.3729083319194615"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:08:19.999Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1516160592747,"_cnpm_publish_time":1516160592747},"2.0.1":{"name":"sorted-array","description":"An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.","version":"2.0.1","keywords":["sorted","array","Neumann","insertion","sort","insert","binary","search","deletion","delete"],"author":{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"},"main":"sorted-array.js","maintainers":[{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"}],"contributors":[{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"}],"bugs":{"url":"https://github.com/javascript/sorted-array/issues"},"licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"repositories":[{"type":"git","url":"https://github.com/javascript/sorted-array.git"}],"dependencies":{},"homepage":"https://github.com/javascript/sorted-array","gitHead":"7de68e34b45ab48df05c056f62dd39bf7c1af1c7","repository":{"type":"git","url":"https://github.com/javascript/sorted-array.git"},"_id":"sorted-array@2.0.1","scripts":{},"_shasum":"a93d5a71f94f0d115a1bb55b26d37582b438bdcc","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.35","_npmUser":{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"},"dist":{"shasum":"a93d5a71f94f0d115a1bb55b26d37582b438bdcc","size":2526,"noattachment":false,"key":"/sorted-array/-/sorted-array-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sorted-array/download/sorted-array-2.0.1.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:08:19.106Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1421464192129,"_cnpm_publish_time":1421464192129},"2.0.0":{"name":"sorted-array","description":"An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.","version":"2.0.0","keywords":["sorted","array","Neumann","insertion","sort","insert","binary","search","deletion","delete"],"author":{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"},"main":"sorted-array.js","maintainers":[{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"}],"contributors":[{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"}],"bugs":{"url":"https://github.com/javascript/sorted-array/issues"},"licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"repositories":[{"type":"git","url":"https://github.com/javascript/sorted-array.git"}],"dependencies":{},"homepage":"https://github.com/javascript/sorted-array","gitHead":"9ae5ab692dfe753927074c3f29295bbad2ecca7f","repository":{"type":"git","url":"https://github.com/javascript/sorted-array.git"},"_id":"sorted-array@2.0.0","scripts":{},"_shasum":"5ed361b6d86f30ef229f5232477972eaf65bbe09","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.35","_npmUser":{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"},"dist":{"shasum":"5ed361b6d86f30ef229f5232477972eaf65bbe09","size":2529,"noattachment":false,"key":"/sorted-array/-/sorted-array-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sorted-array/download/sorted-array-2.0.0.tgz"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:08:18.225Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1421379375356,"_cnpm_publish_time":1421379375356},"1.1.1":{"name":"sorted-array","description":"An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.","version":"1.1.1","keywords":["sorted","array","Neumann","insertion","sort","insert","binary","search","deletion","delete"],"author":{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"},"main":"sorted-array.js","maintainers":[{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"}],"contributors":[{"name":"Aadit M Shah","email":"aaditmshah@fastmail.fm","url":"http://aaditmshah.github.com/"}],"bugs":{"url":"https://github.com/javascript/sorted-array/issues"},"licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"repositories":[{"type":"git","url":"https://github.com/javascript/sorted-array.git"}],"dependencies":{},"homepage":"https://github.com/javascript/sorted-array","repository":{"type":"git","url":"https://github.com/javascript/sorted-array.git"},"_id":"sorted-array@1.1.1","dist":{"shasum":"e72bc8d278d8fc22def530db773f2a4a92bfbbb5","size":2026,"noattachment":false,"key":"/sorted-array/-/sorted-array-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/sorted-array/download/sorted-array-1.1.1.tgz"},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:08:17.347Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1396016894989,"_cnpm_publish_time":1396016894989},"1.1.0":{"name":"sorted-array","description":"An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.","version":"1.1.0","keywords":["sorted","array","Neumann","insertion","sort","insert","binary","search","deletion","delete"],"author":{"name":"Aadit M Shah","email":"aaditmshah@myopera.com","url":"http://aaditmshah.github.com/"},"main":"lib/sorted-array.js","maintainers":[{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"}],"contributors":[{"name":"Aadit M Shah","email":"aaditmshah@myopera.com","url":"http://aaditmshah.github.com/"}],"bugs":"https://github.com/javascript/sorted-array/issues","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"repositories":[{"type":"git","url":"https://github.com/javascript/sorted-array.git"}],"dependencies":{},"homepage":"https://github.com/javascript/sorted-array","_id":"sorted-array@1.1.0","dist":{"shasum":"61a98325e412bb90999b4bac18dfed5f3564102d","size":2042,"noattachment":false,"key":"/sorted-array/-/sorted-array-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sorted-array/download/sorted-array-1.1.0.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"aaditmshah","email":"aaditmshah@myopera.com"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:08:16.483Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1367412617529,"_cnpm_publish_time":1367412617529},"1.0.0":{"name":"sorted-array","description":"An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.","version":"1.0.0","keywords":["sorted","array","Neumann","insertion","sort","insert","binary","search","deletion","delete"],"author":{"name":"Aadit M Shah","email":"aaditmshah@myopera.com","url":"http://aaditmshah.github.com/"},"main":"lib/sorted-array.js","maintainers":[{"name":"aaditmshah","email":"aaditmshah@fastmail.fm"}],"contributors":[{"name":"Aadit M Shah","email":"aaditmshah@myopera.com","url":"http://aaditmshah.github.com/"}],"bugs":"https://github.com/javascript/sorted-array/issues","licenses":[{"type":"MIT","url":"http://opensource.org/licenses/MIT"}],"repositories":[{"type":"git","url":"https://github.com/javascript/sorted-array.git"}],"dependencies":{},"homepage":"https://github.com/javascript/sorted-array","_id":"sorted-array@1.0.0","dist":{"shasum":"432e6911937eeb33aababd68fc9d29057fdc7153","size":2046,"noattachment":false,"key":"/sorted-array/-/sorted-array-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/sorted-array/download/sorted-array-1.0.0.tgz"},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"aaditmshah","email":"aaditmshah@myopera.com"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T02:08:15.625Z","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1367412427059,"_cnpm_publish_time":1367412427059}},"readme":"# Sorted Array #\n\nAn implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.\n\n## Installation ##\n\nSorted arrays may be installed on [node.js](http://nodejs.org/ \"node.js\") via the [node package manager](https://npmjs.org/ \"npm\") using the command `npm install sorted-array`.\n\nYou may also install it on [RingoJS](http://ringojs.org/ \"Home - RingoJS\") using the command `ringo-admin install javascript/sorted-array`.\n\nYou may install it as a [component](https://github.com/component/component \"component/component\") for web apps using the command `component install javascript/sorted-array`.\n\n## Usage ##\n\nThe six line tutorial on sorted arrays:\n\n```javascript\nvar SortedArray = require(\"sorted-array\");\nvar sorted = new SortedArray([3, 1, 5, 2, 4]);\nconsole.dir(sorted.array);                     // [1, 2, 3, 4, 5]\nsorted.search(3);                              // 2\nsorted.remove(3);                              // [1, 2, 4, 5]\nsorted.insert(3);                              // [1, 2, 3, 4, 5]\n```\n\nYou may pass an optional [compare function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) as a second argument to the `SortedArray` constructor.\n\nYou may also use the `SortedArray.comparing(property, array)` factory function to create a new `SortedArray` which compares values by their `property`. For example, to compare arrays by `length`:\n\n```javascript\nvar SortedArray = require(\"sorted-array\");\nvar sorted = SortedArray.comparing(length, [[3,3,3], [1], [5,5,5,5,5], [2,2], [4,4,4,4]]);\nconsole.dir(sorted.array);              // [[1], [2,2], [3,3,3], [4,4,4,4], [5,5,5,5,5]]\n\nfunction length(a) {\n    return a.length;\n}\n```\n","_attachments":{},"homepage":"https://github.com/aaditmshah/sorted-array","bugs":{"url":"https://github.com/aaditmshah/sorted-array/issues"}}