{"name":"fuzzy-search","version":"3.3.0","keywords":["fuzzy","search","javascript"],"author":{"name":"Wouter Rutgers"},"license":"ISC","_id":"fuzzy-search@3.3.0","maintainers":[{"name":"wouter2203","email":"wouter1994_67@hotmail.com"}],"homepage":"https://github.com/wouterrutgers/fuzzy-search#readme","bugs":{"url":"https://github.com/wouterrutgers/fuzzy-search/issues"},"dist":{"shasum":"659303e5c483e56623a2612efa8a1e94962758f7","tarball":"http://registry-npm.ywwl.com/fuzzy-search/download/fuzzy-search-3.3.0.tgz","fileCount":7,"integrity":"sha512-08Kc92wGgey2LeTcN0dG8zB+tzSgwujLEYRr3UstbkcxIZC7x9X7BjnIXCz2tAzcCqe6PRubmKr06WxAgA/U8Q==","signatures":[{"sig":"MEUCIGwHNHBb2l5EahZUkAw1GBanMx1ADi6jzHOoP5Msw0SfAiEA8LwfFNN3Y9oaTuiD0YREtB5XvT8mtsYV0ji3ZZSwujU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDYa2ftaSCfnyUDRaFqVZwhzwgaEE2jfcxOAWRWZiQN/wIhAKq7LV7jC+BK04BYR1ULJ4wAqG8J4W14HT7YmqwyMz6B","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/fuzzy-search@3.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13047,"size":5069,"noattachment":false,"key":"/fuzzy-search/-/fuzzy-search-3.3.0.tgz"},"main":"./dist/FuzzySearch.js","module":"./dist/FuzzySearch.mjs","gitHead":"0b5218a4037336fad9fd75e573c060bab46726a6","scripts":{"lint":"eslint src spec scripts vite.config.mjs eslint.config.mjs","test":"vitest run","build":"vite build","prepack":"vite build","release":"node scripts/release.mjs","test:watch":"vitest","test:package":"node scripts/check-package.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ec2135a1-5e1e-40fe-8691-4edd489880c0"}},"repository":{"url":"git+https://github.com/wouterrutgers/fuzzy-search.git","type":"git"},"_npmVersion":"11.19.0","description":"Simple fuzzy search","directories":{},"_nodeVersion":"24.20.0","_hasShrinkwrap":false,"packageManager":"pnpm@12.4.2","devDependencies":{"vite":"^8.3.0","eslint":"^10.10.0","vitest":"^5.0.1","@eslint/js":"^10.0.1"},"tonicExampleFilename":"example.js","_npmOperationalInternal":{"tmp":"tmp/fuzzy-search_3.3.0_1789847386139_0.24059414677665836","host":"s3://npm-registry-packages-npm-production"},"readme":"# Fuzzy search\n\n*Simple lightweight fuzzy search library written in JavaScript, with zero runtime dependencies!*\n\n[![Checks](https://github.com/wouterrutgers/fuzzy-search/actions/workflows/test.yml/badge.svg)](https://github.com/wouterrutgers/fuzzy-search/actions/workflows/test.yml)\n[![npm](https://img.shields.io/npm/v/fuzzy-search.svg)](https://www.npmjs.com/package/fuzzy-search)\n[![npm](https://img.shields.io/npm/dm/fuzzy-search.svg)](https://www.npmjs.com/package/fuzzy-search)\n[![Donate](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NUA68T5TCC2BN)\n\n## Installation\n\n> Using npm\n\n`npm install fuzzy-search`\n\n> Using pnpm\n\n`pnpm add fuzzy-search`\n\n> Using `<script>`\n\n`<script src=\"FuzzySearch.js\"></script>`\n\nThe browser bundle is available at `dist/FuzzySearch.js` in the published package and exposes `FuzzySearch` globally.\n\n## Quick start guide\n```javascript\n// This can be excluded when loaded via <script>\nimport FuzzySearch from 'fuzzy-search'; // Or: var FuzzySearch = require('fuzzy-search');\n\nconst people = [{\n  name: {\n    firstName: 'Jesse',\n    lastName: 'Bowen',\n  },\n  state: 'Seattle',\n}];\n\nconst searcher = new FuzzySearch(people, ['name.firstName', 'state'], {\n  caseSensitive: true,\n});\nconst result = searcher.search('ess');\n```\n\n## Development\n\nUse Node.js 24 and pnpm. Run `pnpm install`, `pnpm test`, `pnpm lint`, `pnpm build`, and `pnpm test:package`.\n\n## Documentation\n```javascript\nconst searcher = new FuzzySearch(<haystack>, [keys], [options]);\nconst result = searcher.search(<needle>);\n```\n\n**haystack** *(type: `Array`)*\n\nArray of objects containing the search list.\n\n---\n\n**[keys]** *(type: `Array`, default: `[]`)*\n\nList of properties that will be searched. This also supports nested properties.\n\n---\n\n**[options]** *(type: `Object`)*\n\nObject with options that will configure the search. Scroll/Swipe down to see more information on what options are available.\n\n---\n\n**\\<needle\\>** *(type: `String`, default: `''`)*\n\nThe string to Fuzzy Search on.\n\n### Options\n**caseSensitive** *(type: `Boolean`, default: `false`)*\n\nIndicates whether comparisons should be case sensitive.\n\n**sort** *(type: `Boolean`, default: `false`)*\n\nWhen `true` it will sort the results by best match (when searching for `abc` in the search set `['a__b__c', 'abc']` it would return `abc` as the first result).\n\nWhen `false` it will return the results in the original order.\n","publish_time":1789847386211,"_cnpm_publish_time":1789847386211,"dist-tags":{"latest":"3.3.0"}}