{"_id":"@storybook/react-fuzzy","_rev":"471287","name":"@storybook/react-fuzzy","description":"React Fuzzy Component","dist-tags":{"latest":"0.4.3"},"maintainers":[{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"hypnosphi","email":""},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"ndelangen","email":""},{"name":"pago","email":"patrick@pagosoft.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":""},{"name":"usulpro","email":"regx@usul.su"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"}],"time":{"modified":"2021-08-05T08:19:27.000Z","created":"2017-05-10T19:40:24.928Z","0.4.3":"2017-10-22T12:24:36.793Z","0.4.1":"2017-10-18T07:31:09.772Z","0.4.0":"2017-05-10T19:40:24.928Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/storybooks/react-fuzzy-search.git"},"versions":{"0.4.3":{"name":"@storybook/react-fuzzy","version":"0.4.3","description":"React Fuzzy Component","repository":{"type":"git","url":"git+https://github.com/storybooks/react-fuzzy-search.git"},"bugs":{"url":"https://github.com/storybooks/react-fuzzy-search/issues"},"homepage":"https://github.com/storybooks/react-fuzzy-search","license":"MIT","scripts":{"prepublish":". ./.scripts/prepublish.sh","lint":"eslint src","lintfix":"eslint src --fix","testonly":"mocha --require .scripts/mocha_runner src/**/tests/**/*.js","test":"npm run lint && npm run testonly","test-watch":"npm run testonly -- --watch --watch-extensions js","storybook":"start-storybook -p 9010","publish-storybook":"bash .scripts/publish_storybook.sh"},"devDependencies":{"@kadira/storybook":"^2.35.3","@ndelangen/eslint-config-airbnb":"14.1.0","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^7.2.3","babel-loader":"^7.0.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.23.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","babel-preset-stage-2":"^6.24.1","chai":"^3.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","enzyme":"^2.8.2","eslint":"^3.19.0","eslint-config-prettier":"^2.0.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jest":"^20.0.0","eslint-plugin-jsx-a11y":"^5.0.1","eslint-plugin-prettier":"^2.0.1","eslint-plugin-react":"^7.0.0","git-url-parse":"^6.2.2","jsdom":"^10.1.0","mocha":"^3.3.0","prettier":"^1.3.1","raw-loader":"^0.5.1","react":"^15.5.4","react-addons-test-utils":"^15.5.1","react-dom":"^15.5.4","sinon":"^2.2.0","stack-source-map":"^1.0.6","style-loader":"^0.17.0","webpack-hot-middleware":"^2.18.0"},"peerDependencies":{"react":"^0.14.7 || ^15.0.0 || ^16.0.0"},"dependencies":{"babel-runtime":"^6.23.0","classnames":"^2.2.5","fuse.js":"^3.0.1","prop-types":"^15.5.9"},"main":"dist/index.js","config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"gitHead":"b5f0ad2b659adff16fc54ee3a99fb50cd31b190f","_id":"@storybook/react-fuzzy@0.4.3","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"hypnosphi","email":"talpa@yandex.ru"},"dist":{"shasum":"36f7536ba97bf08b03cb57f47c58ae2cca330aec","size":9484,"noattachment":false,"key":"/@storybook/react-fuzzy/-/@storybook/react-fuzzy-0.4.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@storybook/react-fuzzy/download/@storybook/react-fuzzy-0.4.3.tgz"},"maintainers":[{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"hypnosphi","email":""},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"ndelangen","email":""},{"name":"pago","email":"patrick@pagosoft.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":""},{"name":"usulpro","email":"regx@usul.su"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-fuzzy-0.4.3.tgz_1508675075139_0.5344775291159749"},"directories":{},"publish_time":1508675076793,"_hasShrinkwrap":false,"_cnpm_publish_time":1508675076793},"0.4.1":{"name":"@storybook/react-fuzzy","version":"0.4.1","description":"React Fuzzy Component","repository":{"type":"git","url":"git+https://github.com/storybooks/react-fuzzy-search.git"},"bugs":{"url":"https://github.com/storybooks/react-fuzzy-search/issues"},"homepage":"https://github.com/storybooks/react-fuzzy-search","license":"MIT","scripts":{"prepublish":". ./.scripts/prepublish.sh","lint":"eslint src","lintfix":"eslint src --fix","testonly":"mocha --require .scripts/mocha_runner src/**/tests/**/*.js","test":"npm run lint && npm run testonly","test-watch":"npm run testonly -- --watch --watch-extensions js","storybook":"start-storybook -p 9010","publish-storybook":"bash .scripts/publish_storybook.sh"},"devDependencies":{"@kadira/storybook":"^2.35.3","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^7.2.3","babel-loader":"^7.0.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.23.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","babel-preset-stage-2":"^6.24.1","chai":"^3.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","enzyme":"^2.8.2","eslint":"^3.19.0","@ndelangen/eslint-config-airbnb":"14.1.0","eslint-config-prettier":"^2.0.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^5.0.1","eslint-plugin-prettier":"^2.0.1","eslint-plugin-react":"^7.0.0","eslint-plugin-jest":"^20.0.0","git-url-parse":"^6.2.2","jsdom":"^10.1.0","mocha":"^3.3.0","prettier":"^1.3.1","raw-loader":"^0.5.1","react":"^15.5.4","react-addons-test-utils":"^15.5.1","react-dom":"^15.5.4","sinon":"^2.2.0","stack-source-map":"^1.0.6","style-loader":"^0.17.0","webpack-hot-middleware":"^2.18.0"},"peerDependencies":{"react":"^0.14.7 || ^15.0.0 || ^16.0.0"},"dependencies":{"prop-types":"^15.5.9","babel-runtime":"^6.23.0","classnames":"^2.2.5","fuse.js":"^3.0.1"},"main":"dist/index.js","config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"gitHead":"fb3a770453abce1e9f1995e5507a976fe89ac921","_id":"@storybook/react-fuzzy@0.4.1","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"ndelangen","email":"ndelangen@me.com"},"dist":{"shasum":"612bdf7768585ad6e086b4738efbf204e94290a0","size":5634,"noattachment":false,"key":"/@storybook/react-fuzzy/-/@storybook/react-fuzzy-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@storybook/react-fuzzy/download/@storybook/react-fuzzy-0.4.1.tgz"},"maintainers":[{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"hypnosphi","email":""},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"ndelangen","email":""},{"name":"pago","email":"patrick@pagosoft.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":""},{"name":"usulpro","email":"regx@usul.su"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-fuzzy-0.4.1.tgz_1508311868916_0.606781056849286"},"directories":{},"publish_time":1508311869772,"_hasShrinkwrap":false,"_cnpm_publish_time":1508311869772},"0.4.0":{"name":"@storybook/react-fuzzy","version":"0.4.0","description":"React Fuzzy Component","repository":{"type":"git","url":"git+https://github.com/storybooks/react-fuzzy-search.git"},"bugs":{"url":"https://github.com/storybooks/react-fuzzy-search/issues"},"homepage":"https://github.com/storybooks/react-fuzzy-search","license":"MIT","scripts":{"prepublish":". ./.scripts/prepublish.sh","lint":"eslint src","lintfix":"eslint src --fix","testonly":"mocha --require .scripts/mocha_runner src/**/tests/**/*.js","test":"npm run lint && npm run testonly","test-watch":"npm run testonly -- --watch --watch-extensions js","storybook":"start-storybook -p 9010","publish-storybook":"bash .scripts/publish_storybook.sh"},"devDependencies":{"@kadira/storybook":"^2.35.3","babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-eslint":"^7.2.3","babel-loader":"^7.0.0","babel-plugin-transform-runtime":"^6.23.0","babel-polyfill":"^6.23.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","babel-preset-stage-2":"^6.24.1","chai":"^3.5.0","commitizen":"^2.9.6","cz-conventional-changelog":"^2.0.0","enzyme":"^2.8.2","eslint":"^3.19.0","@ndelangen/eslint-config-airbnb":"14.1.0","eslint-config-prettier":"^2.0.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^5.0.1","eslint-plugin-prettier":"^2.0.1","eslint-plugin-react":"^7.0.0","eslint-plugin-jest":"^20.0.0","git-url-parse":"^6.2.2","jsdom":"^10.1.0","mocha":"^3.3.0","prettier":"^1.3.1","raw-loader":"^0.5.1","react":"^15.5.4","react-addons-test-utils":"^15.5.1","react-dom":"^15.5.4","sinon":"^2.2.0","stack-source-map":"^1.0.6","style-loader":"^0.17.0","webpack-hot-middleware":"^2.18.0"},"peerDependencies":{"react":"^0.14.7 || ^15.0.0"},"dependencies":{"prop-types":"^15.5.9","babel-runtime":"^6.23.0","classnames":"^2.2.5","fuse.js":"^3.0.1"},"main":"dist/index.js","config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"gitHead":"638f7a3adc593d2c5e47a6d2e83b4b4e7783b087","_id":"@storybook/react-fuzzy@0.4.0","_shasum":"2961e8a1f6c1afcce97e9e9a14d1dfe9d9061087","_from":".","_npmVersion":"4.5.0","_nodeVersion":"6.10.0","_npmUser":{"name":"ndelangen","email":"ndelangen@me.com"},"dist":{"shasum":"2961e8a1f6c1afcce97e9e9a14d1dfe9d9061087","size":5621,"noattachment":false,"key":"/@storybook/react-fuzzy/-/@storybook/react-fuzzy-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@storybook/react-fuzzy/download/@storybook/react-fuzzy-0.4.0.tgz"},"maintainers":[{"name":"amalik2","email":"ahnmalik2@gmail.com"},{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},{"name":"ghengeveld","email":"info@ghengeveld.nl"},{"name":"gongreg","email":"gytis.vinclovas@gmail.com"},{"name":"hypnosphi","email":""},{"name":"igor-dv","email":"davydkin.igor@gmail.com"},{"name":"kylesuss","email":"susskyle@gmail.com"},{"name":"monkeyworks","email":"igor.szyporyn@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"ndelangen","email":""},{"name":"pago","email":"patrick@pagosoft.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"pksunkara","email":"pavan.sss1991@gmail.com"},{"name":"tmeasday","email":""},{"name":"usulpro","email":"regx@usul.su"},{"name":"winkervsbecks","email":"varunvachhar@gmail.com"},{"name":"yannbf","email":"yannbf@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/react-fuzzy-0.4.0.tgz_1494445222897_0.35092489677481353"},"directories":{},"publish_time":1494445224928,"_hasShrinkwrap":false,"_cnpm_publish_time":1494445224928}},"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","_attachments":{},"homepage":"https://github.com/storybooks/react-fuzzy-search","bugs":{"url":"https://github.com/storybooks/react-fuzzy-search/issues"},"license":"MIT"}