Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@types/autosuggest-highlight
Advanced tools
TypeScript definitions for autosuggest-highlight
@types/autosuggest-highlight provides TypeScript definitions for the autosuggest-highlight library, which is used to highlight matching parts of suggestions in an autosuggest or autocomplete component.
Highlight Matching Parts
This feature allows you to highlight the parts of a suggestion that match the user's query. The `match` function finds the matching parts, and the `parse` function splits the text into highlighted and non-highlighted parts.
const highlight = require('autosuggest-highlight');
const text = 'Hello World';
const query = 'lo';
const matches = highlight.match(text, query);
const parts = highlight.parse(text, matches);
console.log(parts);
react-highlight-words is a React component that highlights words within a larger body of text. It is similar to @types/autosuggest-highlight in that it can be used to highlight parts of text that match a query, but it is specifically designed for use with React.
highlight.js is a syntax highlighter written in JavaScript. While it is more general-purpose and not specifically designed for autosuggest or autocomplete components, it can be used to highlight matching parts of text in a similar way to @types/autosuggest-highlight.
fuse.js is a lightweight fuzzy-search library that can be used to perform search and highlight matching parts of the text. It offers more advanced search capabilities compared to @types/autosuggest-highlight, including fuzzy matching and scoring.
npm install --save @types/autosuggest-highlight
This package contains type definitions for autosuggest-highlight (https://github.com/moroshko/autosuggest-highlight#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/autosuggest-highlight.
These definitions were written by Artur Sianiuk, and Mikhail Yarigo.
FAQs
TypeScript definitions for autosuggest-highlight
We found that @types/autosuggest-highlight demonstrated a not healthy version release cadence and project activity because the last version was released 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.