1 {"_id":"fuzzaldrin","_rev":"36-5a37df041e18a19506d6b46d6fe203eb","name":"fuzzaldrin","description":"Fuzzy filtering and string scoring","dist-tags":{"latest":"2.1.0"},"versions":{"0.1.0":{"name":"fuzzaldrin","version":"0.1.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"~0.15.0","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","tantamount":"~0.6.0"},"_id":"fuzzaldrin@0.1.0","dist":{"shasum":"c8df93b7f0437dffce5faad48066d45fce360447","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.9","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"}],"directories":{}},"0.2.0":{"name":"fuzzaldrin","version":"0.2.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"node_modules/.bin/coffee --nodejs --harmony_collections benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"~0.15.0","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","tantamount":"~0.6.0","coffee-script":"~1.6.3"},"_id":"fuzzaldrin@0.2.0","dist":{"shasum":"fdb954df3bbd60dfa6ec125ff5873f11501a928c","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-0.2.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"}],"directories":{}},"0.3.0":{"name":"fuzzaldrin","version":"0.3.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"node_modules/.bin/coffee --nodejs --harmony_collections benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"~0.15.0","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","tantamount":"~0.6.0","coffee-script":"~1.6.3"},"_id":"fuzzaldrin@0.3.0","dist":{"shasum":"e5f62a035cebc2b17b95ab1a0fb6a33519468c10","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-0.3.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"}],"directories":{}},"0.4.0":{"name":"fuzzaldrin","version":"0.4.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"node_modules/.bin/coffee --nodejs --harmony_collections benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"~0.15.0","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","tantamount":"~0.6.0","coffee-script":"~1.6.3"},"_id":"fuzzaldrin@0.4.0","dist":{"shasum":"55d4a4837a793bab6ff6825b33b9915bf0ecb9a3","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-0.4.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"}],"directories":{}},"0.5.0":{"name":"fuzzaldrin","version":"0.5.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"node_modules/.bin/coffee --nodejs --harmony_collections benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"~0.15.0","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","coffee-script":"~1.6.3"},"_id":"fuzzaldrin@0.5.0","dist":{"shasum":"f60ff972ad9f7061caf8020f07f90f824f27e99c","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-0.5.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"}],"directories":{}},"0.6.0":{"name":"fuzzaldrin","version":"0.6.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"node_modules/.bin/coffee --nodejs --harmony_collections benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"~0.15.0","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","coffee-script":"~1.6.3"},"_id":"fuzzaldrin@0.6.0","dist":{"shasum":"98f2eb1b5febb61613a0ba897a9f03fb63bf06e5","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-0.6.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"}],"directories":{}},"0.7.0":{"name":"fuzzaldrin","version":"0.7.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"node_modules/.bin/coffee --nodejs --harmony_collections benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"~0.15.0","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","coffee-script":"~1.6.3"},"_id":"fuzzaldrin@0.7.0","dist":{"shasum":"8b1ca3a4795c49ed03928316b6165e29ab90ffee","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-0.7.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"}],"directories":{}},"0.8.0":{"name":"fuzzaldrin","version":"0.8.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"node_modules/.bin/coffee --nodejs --harmony_collections benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"~0.15.0","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","coffee-script":"~1.6.3"},"_id":"fuzzaldrin@0.8.0","dist":{"shasum":"1d0e1cc39749cfe9c3631ee1f04951695e315dde","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-0.8.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"}],"directories":{}},"1.0.0":{"name":"fuzzaldrin","version":"1.0.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"node_modules/.bin/coffee --nodejs --harmony_collections benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"1.x","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","coffee-script":"~1.6.3"},"_id":"fuzzaldrin@1.0.0","dist":{"shasum":"1ee8d11c3eb9255d86ec860a588be7fd8dc1a38b","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-1.0.0.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"}],"directories":{}},"1.1.0":{"name":"fuzzaldrin","version":"1.1.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"node_modules/.bin/coffee --nodejs --harmony_collections benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"1.x","grunt-contrib-coffee":"~0.7.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","coffee-script":"~1.6.3"},"_id":"fuzzaldrin@1.1.0","dist":{"shasum":"6e02e76b02ddf0f0b09c64a3ab136bddf4cb6dbe","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-1.1.0.tgz"},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"probablycorey","email":"probablycorey@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},{"name":"probablycorey","email":"probablycorey@gmail.com"},{"name":"nathansobo","email":"nathansobo@gmail.com"}],"directories":{}},"1.2.0":{"name":"fuzzaldrin","version":"1.2.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"coffee benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"1.x","grunt-contrib-coffee":"~0.9.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","coffee-script":"~1.7"},"_id":"fuzzaldrin@1.2.0","dist":{"shasum":"0bab781e6584689fa6db42ad1e5b383582002305","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-1.2.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},{"name":"probablycorey","email":"probablycorey@gmail.com"},{"name":"nathansobo","email":"nathansobo@gmail.com"}],"directories":{}},"2.0.0":{"name":"fuzzaldrin","version":"2.0.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"coffee benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"1.x","grunt-contrib-coffee":"~0.9.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","coffee-script":"~1.7"},"_id":"fuzzaldrin@2.0.0","dist":{"shasum":"bcfabf4dce58bb48e963ca40ab468f294d5100a2","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-2.0.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},{"name":"probablycorey","email":"probablycorey@gmail.com"},{"name":"nathansobo","email":"nathansobo@gmail.com"}],"directories":{}},"2.1.0":{"name":"fuzzaldrin","version":"2.1.0","description":"Fuzzy filtering and string scoring","licenses":[{"type":"MIT","url":"http://github.com/atom/fuzzaldrin/raw/master/LICENSE.md"}],"main":"./lib/fuzzaldrin.js","scripts":{"prepublish":"grunt prepublish","test":"grunt test","benchmark":"coffee benchmark/benchmark.coffee"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"devDependencies":{"jasmine-focused":"1.x","grunt-contrib-coffee":"~0.9.0","grunt-cli":"~0.1.8","grunt":"~0.4.1","grunt-shell":"~0.2.2","grunt-coffeelint":"0.0.6","coffee-script":"~1.7"},"_id":"fuzzaldrin@2.1.0","dist":{"shasum":"90204c3e2fdaa6941bb28d16645d418063a90e9b","tarball":"http://registry.npmjs.org/fuzzaldrin/-/fuzzaldrin-2.1.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},"maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},{"name":"probablycorey","email":"probablycorey@gmail.com"},{"name":"nathansobo","email":"nathansobo@gmail.com"},{"name":"benogle","email":"ogle.ben@gmail.com"}],"directories":{}}},"readme":"# fuzzaldrin\n\n[![Build Status](https://travis-ci.org/atom/fuzzaldrin.svg?branch=master)](https://travis-ci.org/atom/fuzzaldrin)\n[![Build status](https://ci.appveyor.com/api/projects/status/0ig71rjdgfm7y9c1/branch/master)](https://ci.appveyor.com/project/kevinsawicki/fuzzaldrin/branch/master)\n\nFuzzy filtering and string scoring.\n\nThis library is used by [Atom](http://atom.io) and so its focus will be on\nscoring and filtering paths, methods, and other things common when writing code.\nIt therefore will specialize in handling common patterns in these types of\nstrings such as characters like `/`, `-`, and `_`, and also handling of\ncamel cased text.\n\n## Using\n\n```sh\nnpm install fuzzaldrin\n```\n\n### filter(candidates, query, [options])\n\nSort and filter the given candidates by matching them against the given query.\n\n* `candidates` - An array of strings or objects.\n* `query` - A string query to match each candidate against.\n* `options` - An optional object with the following keys:\n * `key` - The property to use for scoring if the candidates are objects.\n * `maxResults` - The maximum numbers of results to return.\n\nReturns an array of candidates sorted by best match against the query.\n\n```coffee\n{filter} = require 'fuzzaldrin'\n\n# With an array of strings\ncandidates = ['Call', 'Me', 'Maybe']\nresults = filter(candidates, 'me')\nconsole.log(results) # ['Me', 'Maybe']\n\n# With an array of objects\ncandidates = [\n {name: 'Call', id: 1}\n {name: 'Me', id: 2}\n {name: 'Maybe', id: 3}\n]\nresults = filter(candidates, 'me', key: 'name')\nconsole.log(results) # [{name: 'Me', id: 2}, {name: 'Maybe', id: 3}]\n```\n\n### score(string, query)\n\nScore the given string against the given query.\n\n* `string` - The string the score.\n* `query` - The query to score the string against.\n\n```coffee\n{score} = require 'fuzzaldrin'\n\nscore('Me', 'me') # 0.17099999999999999\nscore('Maybe', 'me') # 0.0693\n```\n\n## Developing\n\n```sh\ngit clone https://github.com/atom/fuzzaldrin.git\ncd fuzzaldrin\nnpm install\nnpm test\n```\n\nYou can run the benchmarks using:\n\n```sh\nnpm run benchmark\n```\n","maintainers":[{"name":"kevinsawicki","email":"kevinsawicki@gmail.com"},{"name":"probablycorey","email":"probablycorey@gmail.com"},{"name":"nathansobo","email":"nathansobo@gmail.com"},{"name":"benogle","email":"ogle.ben@gmail.com"}],"time":{"modified":"2014-09-03T16:43:01.593Z","created":"2013-10-17T16:40:20.873Z","0.1.0":"2013-10-17T16:40:22.251Z","0.2.0":"2014-01-08T18:59:16.212Z","0.3.0":"2014-01-08T19:52:20.324Z","0.4.0":"2014-01-08T21:59:32.641Z","0.5.0":"2014-01-08T22:11:16.930Z","0.6.0":"2014-01-10T20:53:50.725Z","0.7.0":"2014-01-25T01:55:33.514Z","0.8.0":"2014-01-30T22:54:50.060Z","1.0.0":"2014-01-30T23:00:10.576Z","1.1.0":"2014-02-27T22:44:20.097Z","1.2.0":"2014-05-28T16:29:08.415Z","2.0.0":"2014-06-13T00:45:46.236Z","2.1.0":"2014-09-03T16:43:01.593Z"},"repository":{"type":"git","url":"https://github.com/atom/fuzzaldrin.git"},"readmeFilename":"README.md","homepage":"http://atom.github.io/fuzzaldrin","keywords":["fuzzy","filter","stringscore"],"bugs":{"url":"https://github.com/atom/fuzzaldrin/issues"},"users":{"davidtsuji":true},"_attachments":{},"_etag":"\"CHYJXGTA7QS279A8EQAHGMZFV\""}