Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
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,104 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.