{"_id":"sorted-indexof","_rev":"2-7c371d1270ad279a3b69c9c30843f7f6","name":"sorted-indexof","description":"Given two sorted arrays, a and b, efficiently return an array of indexes of b's elements in a.","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"sorted-indexof","version":"1.0.0","description":"Given two sorted arrays, a and b, efficiently return an array of indexes of b's elements in a.","main":"index.js","dependencies":{},"devDependencies":{"standard":"^10.0.2","tape":"^4.6.3"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/sorted-indexof.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/sorted-indexof/issues"},"homepage":"https://github.com/mafintosh/sorted-indexof","gitHead":"7baec339aaf0fae77e459c9f5d0081414a57f4f9","_id":"sorted-indexof@1.0.0","_shasum":"17c742ff7cf187e2f59a15df9b81f17a62ce0899","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"17c742ff7cf187e2f59a15df9b81f17a62ce0899","tarball":"https://registry.npmjs.org/sorted-indexof/-/sorted-indexof-1.0.0.tgz","integrity":"sha512-N9bptDwgg6V4b9DexkX1Zmj2raV4jRPdVfE3Tri8DvtocNhdl52z+eekD/8mlFDMe9G0uqd95U5YFjHQuA1tGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDUYRcAwpkNnI/842sukIHm/dOKgvk+vXqAToTTm7BkgAiEAq7SochjnHfEExGT0BOUx0SlkVv0gtf4dn6FMMsoBXnc="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sorted-indexof-1.0.0.tgz_1496420729828_0.6786240069195628"}}},"readme":"# sorted-indexof\n\nGiven two sorted arrays, a and b, efficiently return an array of indexes\nof b's elements in a.\n\nRuns in `O(n+m)` where n and m are the sizes of the sorted arrays.\n\n```\nnpm install sorted-indexof\n```\n\n[![Build Status](https://travis-ci.org/mafintosh/sorted-indexof.svg?branch=master)](https://travis-ci.org/mafintosh/sorted-indexof)\n\n## Usage\n\n``` js\nvar indexOf = require('sorted-indexof')\n\nvar a = ['b', 'c', 'd', 'e', 'f']\nvar b = ['a', 'b', 'c', 'f', 'g', 'h']\n\nconsole.log(indexOf(a, b))\n```\n\nRunning the above returns\n\n```\n[ -1, 0, 1, 4, -1, -1 ]\n```\n\nWhich corresponds to taking each element of `b` and running `a.indexOf(el)`.\n\n## API\n\n#### `var indexes = indexOf(a, b)`\n\nReturns an array of indexes of `b`s elements in `a`.\nAn an element in `b` does not exist in `a`, `-1` is inserted.\n\nNote that `a` and `b` MUST be sorted.\n\n## License\n\nMIT\n","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"time":{"modified":"2022-06-26T22:17:55.088Z","created":"2017-06-02T16:25:30.732Z","1.0.0":"2017-06-02T16:25:30.732Z"},"homepage":"https://github.com/mafintosh/sorted-indexof","repository":{"type":"git","url":"git+https://github.com/mafintosh/sorted-indexof.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/sorted-indexof/issues"},"license":"MIT","readmeFilename":"README.md"}