Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
gitbook-plugin-search
Advanced tools
This plugin is the interface used by all the search plugins (plugin-lunr
, plugin-algolia
, etc.)
Your plugin must register as a Search handler during its activate
method:
GitBook.createPlugin({
activate: (dispatch, getState, { Search }) => {
dispatch(Search.registerHandler('my-plugin-name', searchHandler));
},
reduce
})
/**
* Search against a query
* @param {String} query
* @return {Promise<List<Result>>}
*/
function searchHandler(query, dispatch, getState) {
...
}
Your search handler must return a List of result-shaped objects. A result object has the following shape:
result = {
title: string, // The title of the resource, as displayed in the list of results.
url: string, // The URL to access the matched resource.
body: string // (optional) The context of the matched text (can be a sentence
// containing matching words). It will be displayed near the result.
}
FAQs
Search input for your GitBook
The npm package gitbook-plugin-search receives a total of 3,208 weekly downloads. As such, gitbook-plugin-search popularity was classified as popular.
We found that gitbook-plugin-search demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.