{"_id":"@storybook/react-fuzzy","_rev":"56-8859dd61ceb8ef5404ab0c764e15c752","name":"@storybook/react-fuzzy","dist-tags":{"latest":"0.4.3"},"versions":{"0.4.0":{"name":"@storybook/react-fuzzy","version":"0.4.0","license":"MIT","_id":"@storybook/react-fuzzy@0.4.0","maintainers":[{"name":"ndelangen","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/react-fuzzy-search","bugs":{"url":"https://github.com/storybooks/react-fuzzy-search/issues"},"dist":{"shasum":"2961e8a1f6c1afcce97e9e9a14d1dfe9d9061087","tarball":"https://registry.npmjs.org/@storybook/react-fuzzy/-/react-fuzzy-0.4.0.tgz","integrity":"sha512-ZOXZlu3RNcR7vWzauDmRxRU6nSOIznWaR0+GjrGpOYli3YvmvH3jG05ToEXtcNewmS++Ne9QYiGCru74WBh8hg==","signatures":[{"sig":"MEYCIQCMnnkHeSXc2KyfH6j/M988tFieXsFo84tK8X+YL+oqJwIhAMpNoLI/oayAzvQGt5jyjy4OcUHYtsfnz0sICgNLvVwH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","_from":".","config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"_shasum":"2961e8a1f6c1afcce97e9e9a14d1dfe9d9061087","gitHead":"638f7a3adc593d2c5e47a6d2e83b4b4e7783b087","scripts":{"lint":"eslint src","test":"npm run lint && npm run testonly","lintfix":"eslint src --fix","testonly":"mocha --require .scripts/mocha_runner src/**/tests/**/*.js","storybook":"start-storybook -p 9010","prepublish":". ./.scripts/prepublish.sh","test-watch":"npm run testonly -- --watch --watch-extensions js","publish-storybook":"bash .scripts/publish_storybook.sh"},"_npmUser":{"name":"ndelangen","email":"ndelangen@me.com"},"repository":{"url":"git+https://github.com/storybooks/react-fuzzy-search.git","type":"git"},"_npmVersion":"4.5.0","description":"React Fuzzy Component","directories":{},"_nodeVersion":"6.10.0","dependencies":{"fuse.js":"^3.0.1","classnames":"^2.2.5","prop-types":"^15.5.9","babel-runtime":"^6.23.0"},"devDependencies":{"chai":"^3.5.0","jsdom":"^10.1.0","mocha":"^3.3.0","react":"^15.5.4","sinon":"^2.2.0","enzyme":"^2.8.2","eslint":"^3.19.0","prettier":"^1.3.1","babel-cli":"^6.24.1","react-dom":"^15.5.4","babel-core":"^6.24.1","commitizen":"^2.9.6","raw-loader":"^0.5.1","babel-eslint":"^7.2.3","babel-loader":"^7.0.0","style-loader":"^0.17.0","git-url-parse":"^6.2.2","babel-polyfill":"^6.23.0","stack-source-map":"^1.0.6","@kadira/storybook":"^2.35.3","babel-preset-react":"^6.24.1","eslint-plugin-jest":"^20.0.0","babel-preset-es2015":"^6.24.1","eslint-plugin-react":"^7.0.0","babel-preset-stage-2":"^6.24.1","eslint-plugin-import":"^2.2.0","eslint-config-prettier":"^2.0.0","eslint-plugin-jsx-a11y":"^5.0.1","eslint-plugin-prettier":"^2.0.1","webpack-hot-middleware":"^2.18.0","react-addons-test-utils":"^15.5.1","cz-conventional-changelog":"^2.0.0","babel-plugin-transform-runtime":"^6.23.0","@ndelangen/eslint-config-airbnb":"14.1.0"},"peerDependencies":{"react":"^0.14.7 || ^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-fuzzy-0.4.0.tgz_1494445222897_0.35092489677481353","host":"packages-12-west.internal.npmjs.com"}},"0.4.1":{"name":"@storybook/react-fuzzy","version":"0.4.1","license":"MIT","_id":"@storybook/react-fuzzy@0.4.1","maintainers":[{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"aaronmcadam","email":"aaron@aaronmcadam.com"},{"name":"mnmtanish","email":"mnmtanish@gmail.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"arunoda","email":"arunoda.susiripala@gmail.com"},{"name":"mthuret","email":"mlthutrix@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/react-fuzzy-search","bugs":{"url":"https://github.com/storybooks/react-fuzzy-search/issues"},"dist":{"shasum":"612bdf7768585ad6e086b4738efbf204e94290a0","tarball":"https://registry.npmjs.org/@storybook/react-fuzzy/-/react-fuzzy-0.4.1.tgz","integrity":"sha512-UCV8HZ3rzEpn36Tn+Ip0ZqcwQjphIcxmnWDF7MgjBJkCPlSahSzALhS9EH6WLBeCDzajoDynAAUhwqC1EPkhkA==","signatures":[{"sig":"MEUCIBCQAo9v25q6boWBiCARavvzyQJobq0fmqCygjr2zPcTAiEA7mJqiXeV4Qsl27WRTUXLGtb74FaHzPQCIeRL8rrwnek=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"dist/index.js","config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"gitHead":"fb3a770453abce1e9f1995e5507a976fe89ac921","scripts":{"lint":"eslint src","test":"npm run lint && npm run testonly","lintfix":"eslint src --fix","testonly":"mocha --require .scripts/mocha_runner src/**/tests/**/*.js","storybook":"start-storybook -p 9010","prepublish":". ./.scripts/prepublish.sh","test-watch":"npm run testonly -- --watch --watch-extensions js","publish-storybook":"bash .scripts/publish_storybook.sh"},"_npmUser":{"name":"ndelangen","email":"ndelangen@me.com"},"repository":{"url":"git+https://github.com/storybooks/react-fuzzy-search.git","type":"git"},"_npmVersion":"5.0.3","description":"React Fuzzy Component","directories":{},"_nodeVersion":"8.1.2","dependencies":{"fuse.js":"^3.0.1","classnames":"^2.2.5","prop-types":"^15.5.9","babel-runtime":"^6.23.0"},"devDependencies":{"chai":"^3.5.0","jsdom":"^10.1.0","mocha":"^3.3.0","react":"^15.5.4","sinon":"^2.2.0","enzyme":"^2.8.2","eslint":"^3.19.0","prettier":"^1.3.1","babel-cli":"^6.24.1","react-dom":"^15.5.4","babel-core":"^6.24.1","commitizen":"^2.9.6","raw-loader":"^0.5.1","babel-eslint":"^7.2.3","babel-loader":"^7.0.0","style-loader":"^0.17.0","git-url-parse":"^6.2.2","babel-polyfill":"^6.23.0","stack-source-map":"^1.0.6","@kadira/storybook":"^2.35.3","babel-preset-react":"^6.24.1","eslint-plugin-jest":"^20.0.0","babel-preset-es2015":"^6.24.1","eslint-plugin-react":"^7.0.0","babel-preset-stage-2":"^6.24.1","eslint-plugin-import":"^2.2.0","eslint-config-prettier":"^2.0.0","eslint-plugin-jsx-a11y":"^5.0.1","eslint-plugin-prettier":"^2.0.1","webpack-hot-middleware":"^2.18.0","react-addons-test-utils":"^15.5.1","cz-conventional-changelog":"^2.0.0","babel-plugin-transform-runtime":"^6.23.0","@ndelangen/eslint-config-airbnb":"14.1.0"},"peerDependencies":{"react":"^0.14.7 || ^15.0.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-fuzzy-0.4.1.tgz_1508311868916_0.606781056849286","host":"s3://npm-registry-packages"}},"0.4.3":{"name":"@storybook/react-fuzzy","version":"0.4.3","license":"MIT","_id":"@storybook/react-fuzzy@0.4.3","maintainers":[{"name":"hypnosphi","email":"talpa@yandex.ru"},{"name":"alexandrebodin","email":"bodin.alex@gmail.com"},{"name":"shilman","email":"michael@lab80.co"},{"name":"aaronmcadam","email":"aaron@aaronmcadam.com"},{"name":"mnmtanish","email":"mnmtanish@gmail.com"},{"name":"usulpro","email":"regx@usul.su"},{"name":"arunoda","email":"arunoda.susiripala@gmail.com"},{"name":"mthuret","email":"mlthutrix@gmail.com"},{"name":"ndelangen","email":"ndelangen@me.com"}],"homepage":"https://github.com/storybooks/react-fuzzy-search","bugs":{"url":"https://github.com/storybooks/react-fuzzy-search/issues"},"dist":{"shasum":"36f7536ba97bf08b03cb57f47c58ae2cca330aec","tarball":"https://registry.npmjs.org/@storybook/react-fuzzy/-/react-fuzzy-0.4.3.tgz","integrity":"sha512-TaFbDiEc/34eiAFyOjyvrh5tOqoKscyVH2BHJB15cQ8RepccX3LKIBqSNr7IUi1jmMB5aWjeefvJywPQf13ByQ==","signatures":[{"sig":"MEUCIQCN5pO0DV5nqrDRcC7yxwN2vg8sqv/rcq9dvZSEHmuZOQIgR6dM1ytLJOdvq3uMoZ0hwbjqavFXG3fdA2oG3i3dnvE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2cbMCRA9TVsSAnZWagAAt+sP/3y597Js3cDohhH8TWqe\nTFQBynp7i4RRe6P5wBDYVle5I6PwlT1PjHxtNmVYn0hdUCWiyDcHu2NtS0cE\nY6NqeBg1GIqviT9Dn3bm8QFiCZzBWdFKvkdC2wJ5gaLZZ68lHkJB3FZGVNBc\neRc/Ql5S1EDFmIp6HeezswRxZgLzXkLPQkED2ZBSWvscHsAKsQOS8AQNOh8D\nKovgHze1WSnZ2GdJXxJqC7IKSWfCvQhn6xq3xg40o6E1Io80rpMDA/q3dlPb\nQXQJ5Oxeki6YQv36WORTvQbfn4zNzSca4f1+oz7yhvbKuxs6W/fZYxROSRQY\n+gTB2B5N59WSh8RQQKoWPnE+21yl8+rphEm9FoGvHKWsJi6QsNj0XMy7G1UD\n7TgqGmnCAkBEqUbXiUhREXujnZhKKOfbe36bolfbMC/mDSpei67h2fSAOVUN\nlmIXK0qV04skz7YHTclmghI7AZz1irBKRySB0wKvBdKkId6TbK1qaDwdK98F\npC6S7v+ICwhrPGUf8zOfSjk4CGgNSPcyxfUhIo66HLR4dsK5EhJB4XpE54Cg\nQgvcZpIDiXvQvD0m+pWGJVy3Ti9qH7sGKblOmuKDUSsZAhOMhxY+B4/9w7os\nAFNCOoNFSMTDkBwgH3MKr2X+BVg6N3UmoTXxHepotIVELn/XDNGjuqyDz27x\nsHzL\r\n=uCtP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"gitHead":"b5f0ad2b659adff16fc54ee3a99fb50cd31b190f","scripts":{"lint":"eslint src","test":"npm run lint && npm run testonly","lintfix":"eslint src --fix","testonly":"mocha --require .scripts/mocha_runner src/**/tests/**/*.js","storybook":"start-storybook -p 9010","prepublish":". ./.scripts/prepublish.sh","test-watch":"npm run testonly -- --watch --watch-extensions js","publish-storybook":"bash .scripts/publish_storybook.sh"},"_npmUser":{"name":"hypnosphi","email":"talpa@yandex.ru"},"repository":{"url":"git+https://github.com/storybooks/react-fuzzy-search.git","type":"git"},"_npmVersion":"5.4.2","description":"React Fuzzy Component","directories":{},"_nodeVersion":"8.7.0","dependencies":{"fuse.js":"^3.0.1","classnames":"^2.2.5","prop-types":"^15.5.9","babel-runtime":"^6.23.0"},"devDependencies":{"chai":"^3.5.0","jsdom":"^10.1.0","mocha":"^3.3.0","react":"^15.5.4","sinon":"^2.2.0","enzyme":"^2.8.2","eslint":"^3.19.0","prettier":"^1.3.1","babel-cli":"^6.24.1","react-dom":"^15.5.4","babel-core":"^6.24.1","commitizen":"^2.9.6","raw-loader":"^0.5.1","babel-eslint":"^7.2.3","babel-loader":"^7.0.0","style-loader":"^0.17.0","git-url-parse":"^6.2.2","babel-polyfill":"^6.23.0","stack-source-map":"^1.0.6","@kadira/storybook":"^2.35.3","babel-preset-react":"^6.24.1","eslint-plugin-jest":"^20.0.0","babel-preset-es2015":"^6.24.1","eslint-plugin-react":"^7.0.0","babel-preset-stage-2":"^6.24.1","eslint-plugin-import":"^2.2.0","eslint-config-prettier":"^2.0.0","eslint-plugin-jsx-a11y":"^5.0.1","eslint-plugin-prettier":"^2.0.1","webpack-hot-middleware":"^2.18.0","react-addons-test-utils":"^15.5.1","cz-conventional-changelog":"^2.0.0","babel-plugin-transform-runtime":"^6.23.0","@ndelangen/eslint-config-airbnb":"14.1.0"},"peerDependencies":{"react":"^0.14.7 || ^15.0.0 || ^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/react-fuzzy-0.4.3.tgz_1508675075139_0.5344775291159749","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-05-10T19:40:24.928Z","modified":"2026-10-27T15:16:10.328Z","0.4.0":"2017-05-10T19:40:24.928Z","0.4.1":"2017-10-18T07:31:09.772Z","0.4.2":"2017-10-22T12:17:11.706Z","0.4.3":"2017-10-22T12:24:36.793Z"},"bugs":{"url":"https://github.com/storybooks/react-fuzzy-search/issues"},"license":"MIT","homepage":"https://github.com/storybooks/react-fuzzy-search","repository":{"url":"git+https://github.com/storybooks/react-fuzzy-search.git","type":"git"},"description":"React Fuzzy Component","maintainers":[{"email":"ndelangen@me.com","name":"ndelangen"},{"email":"shilman@gmail.com","name":"shilman"},{"email":"tom@thesnail.org","name":"tmeasday"},{"email":"varunvachhar@gmail.com","name":"winkervsbecks"},{"email":"kyle.gach@gmail.com","name":"kylegach"},{"email":"jeppe@reinhold.is","name":"jreinhold"},{"email":"kasperpeulen@gmail.com","name":"kasperpeulen"},{"email":"dev@valentinpalkovic.dev","name":"valentinpalkovic"},{"email":"dom@hichroma.com","name":"domyen"},{"email":"storybookbot@gmail.com","name":"storybook-bot"},{"email":"vanessa.yh.yuen@gmail.com","name":"vanessayuenn"}],"readme":"# react-fuzzy\nfuzzy search in React\n\n## Installation\n\n```shell\nnpm install --save @storybook/react-fuzzy\n```\n\n## Basic Usage\n\n```js\nconst list = [{\n  id: 1,\n  title: 'The Great Gatsby',\n  author: 'F. Scott Fitzgerald'\n}, {\n  id: 2,\n  title: 'The DaVinci Code',\n  author: 'Dan Brown'\n}, {\n  id: 3,\n  title: 'Angels & Demons',\n  author: 'Dan Brown'\n}];\n\n<FuzzySearch\n      list={list}\n      keys={['author', 'title']}\n      width={430}\n      onSelect={action('selected')}\n    />\n```\n\n## Custom Result Template\n```js\n<FuzzySearch\n  list={list}\n  keys={['author', 'title']}\n  width={430}\n  onSelect={action('selected')}\n  resultsTemplate={(props, state, styles, clickHandler) => {\n    return state.results.map((val, i) => {\n      const style = state.selectedIndex === i ? styles.selectedResultStyle : styles.resultsStyle;\n      return (\n        <div\n          key={i}\n          style={style}\n          onClick={() => clickHandler(i)}\n        >\n          {val.title}\n          <span style={{ float: 'right', opacity: 0.5 }}>by {val.author}</span>\n        </div>\n      );\n    });\n  }}\n/>\n```\n\n## Options\n\nattribute|default|description\n---------|-------|-----------\ncaseSensitive|false|Indicates whether comparisons should be case sensitive.\nclassName|null|give a custom class name to the root element\ndistance|100|Determines how close the match must be to the fuzzy location (specified by location). An exact letter match which is distance characters away from the fuzzy location would score as a complete mismatch. A distance of 0 requires the match be at the exact location specified, a distance of 1000 would require a perfect match to be within 800 characters of the location to be found using a threshold of 0.8.\nid|null|The name of the identifier property. If specified, the returned result will be a list of the items' identifiers, otherwise it will be a list of the items.\ninclude|[]|An array of values that should be included from the searcher's output. When this array contains elements, each result in the list will be of the form `{ item: ..., include1: ..., include2: ... }`. Values you can include are score, matches. Eg: `{ include: ['score', 'matches' ] }`\nmaxPatternLength|32|The maximum length of the pattern. The longer the pattern, the more intensive the search operation will be. Whenever the pattern exceeds the maxPatternLength, an error will be thrown.\nonSelect| noop | Function to be executed on selection of any result.\nwidth|430|width of the fuzzy searchbox\nkeys|all[Array]|List of properties that will be searched. This also supports nested properties.\nlist|null|Array of properties to be filtered.\nplaceholder|'Search'|Placeholder of the searchbox\nresultsTemplate| Func | Template of the dropdown divs\nshouldSort| true | Whether to sort the result list, by score.\nsortFn|`Array.prototype.sort`|The function that is used for sorting the result list.\nthreshold|0.6|At what point does the match algorithm give up. A threshold of `0.0` requires a perfect match (of both letters and location), a threshold of `1.0` would match anything.\ntokenize|false|When true, the search algorithm will search individual words and the full string, computing the final score as a function of both. Note that when tokenize is true, the `threshold`, `distance`, and `location` are inconsequential for individual tokens.\nverbose|false|Will print to the console. Useful for debugging.\n\n## License\nMIT @ Ritesh Kumar\n","readmeFilename":"README.md"}