Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@docsearch/react

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docsearch/react - npm Package Compare versions

Comparing version 3.0.0-alpha.35 to 3.0.0-alpha.36

2

dist/esm/DocSearchModal.js

@@ -204,3 +204,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var sources = groupBy(hits, function (hit) {
return removeHighlightTags(hit.hierarchy.lvl0);
return removeHighlightTags(hit);
}); // We store the `lvl0`s to display them as search suggestions

@@ -207,0 +207,0 @@ // in the “no results“ screen.

@@ -15,3 +15,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var title = removeHighlightTags(collection.items[0]._highlightResult.hierarchy.lvl0.value);
var title = removeHighlightTags(collection.items[0]);
return /*#__PURE__*/React.createElement(Results, _extends({}, props, {

@@ -18,0 +18,0 @@ key: index,

@@ -1,1 +0,2 @@

export declare function removeHighlightTags(value: string): string;
import { DocSearchHit, InternalDocSearchHit } from './../types';
export declare function removeHighlightTags(hit: DocSearchHit | InternalDocSearchHit): string;
var regexHighlightTags = /(<mark>|<\/mark>)/g;
var regexHasHighlightTags = RegExp(regexHighlightTags.source);
export function removeHighlightTags(value) {
export function removeHighlightTags(hit) {
if (!hit.__docsearch_parent && !hit._highlightResult) {
return hit.hierarchy.lvl0;
}
var _ref = hit._highlightResult ? hit._highlightResult.hierarchy.lvl0 : hit.__docsearch_parent._highlightResult.hierarchy.lvl0,
value = _ref.value;
return value && regexHasHighlightTags.test(value) ? value.replace(regexHighlightTags, '') : value;
}

@@ -1,1 +0,1 @@

export declare const version = "3.0.0-alpha.35";
export declare const version = "3.0.0-alpha.36";

@@ -1,1 +0,1 @@

export var version = '3.0.0-alpha.35';
export var version = '3.0.0-alpha.36';
{
"name": "@docsearch/react",
"description": "React package for DocSearch, the best search experience for docs.",
"version": "3.0.0-alpha.35",
"version": "3.0.0-alpha.36",
"license": "MIT",

@@ -39,3 +39,3 @@ "homepage": "https://docsearch.algolia.com",

"@algolia/autocomplete-preset-algolia": "1.0.0-alpha.44",
"@docsearch/css": "3.0.0-alpha.35",
"@docsearch/css": "3.0.0-alpha.36",
"algoliasearch": "^4.0.0"

@@ -42,0 +42,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc