
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
smart-searcher
Advanced tools
⚡ Tiny, fast, zero-dependency search toolkit for JavaScript/TypeScript. Supports exact lookup, fuzzy search, weighted multi-key search, indexing, filtering, and plugins.
findExact)createIndex)createSearch with fuzzy: true)npm install smart-searcher
# or
yarn add smart-searcher
import { findExact } from 'smart-searcher';
const data = [
{ id: 1, title: 'Apartment Gyumri' },
{ id: 2, title: 'House Yerevan' },
];
const index = findExact(data, 2, 'id');
console.log(index); // 1 (array index)
import { createIndex } from 'smart-searcher';
const data = [
{ id: 1, title: 'Apartment Gyumri' },
{ id: 2, title: 'House Yerevan' },
];
const indexMap = createIndex(data, 'id');
console.log(indexMap.get(2)); // 1
import { filter } from 'smart-searcher';
const data = [
{ id: 1, title: 'Apartment Gyumri', price: 30000 },
{ id: 2, title: 'House Yerevan', price: 80000 },
];
const results = filter(data, { price: { min: 20000, max: 50000 } });
console.log(results);
// [{ id: 1, title: 'Apartment Gyumri', price: 30000 }]
import { createSearch } from 'smart-searcher';
const data = [
{ id: 1, title: 'Apartment Gyumri' },
{ id: 2, title: 'House Yerevan' },
];
const search = createSearch(data, { key: 'title', fuzzy: true });
console.log(search.search('gyumr'));
// [{ id: 1, title: 'Apartment Gyumri' }]
const search = createSearch(data, {
keys: [
{ key: 'title', weight: 0.7 },
{ key: 'location', weight: 0.3 },
],
fuzzy: true
});
console.log(search.search('gyumr'));
// prioritizes matches in `title` over `location`
const searchWithPlugin = createSearch(data, {
key: 'title',
fuzzy: true,
plugins: [
() => ({
beforeSearch: (query) => query.trim().toLowerCase(),
afterSearch: (results) => results.slice(0, 5) // top 5 only
})
]
});
console.log(searchWithPlugin.search(' gyumr '));
const search = createSearch(data, { keys: ['title', 'location'], fuzzy: true });
console.log(search.find(1)); // exact find by id
console.log(search.search('gyumr')); // fuzzy
console.log(search.filter({ price: { max: 50000 } })); // filtered results
smart-searcher?MIT License
FAQs
⚡ Tiny, fast, zero-dependency search toolkit (exact + fuzzy + indexed)
The npm package smart-searcher receives a total of 353 weekly downloads. As such, smart-searcher popularity was classified as not popular.
We found that smart-searcher demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.