New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

search-modal

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

search-modal - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

screenshot.png

2

package.json
{
"name": "search-modal",
"version": "1.1.1",
"version": "1.1.2",
"description": "Vanilla JS Search Modal",

@@ -5,0 +5,0 @@ "keywords": [

@@ -16,3 +16,3 @@ # Search Modal

searchUrl: "", // to search from server
queryParam: "query",
searchKey: "query",
// only applicable when the `searchUrl` is not provided, to search from static data or preloaded data

@@ -22,2 +22,4 @@ data:[

title: "Example",
category: "Category",
summary: "Summary of example one",
url: "/example"

@@ -27,2 +29,4 @@ },

title: "Example 2",
category: "Category",
summary: "Another brief example",
url: "/example-2"

@@ -34,5 +38,5 @@ }

title: item.title,
category: item.category.name,
category: item.category,
excerpt: item.summary,
url: item.link,
url: item.url,
})),

@@ -48,2 +52,26 @@ callback: (event, data) => {

## unpkg usage by @dandv
```
<link rel="stylesheet" href="https://search-modal.msar.me/dist/style.css">
<script type="module">
import SearchModal from 'https://unpkg.com/search-modal?module';
const instance = SearchModal({ ... });
// Activate on Cmd/Ctrl+K
document.addEventListener("keydown", (event) => {
if ((event.ctrlKey || event.metaKey) && event.key === "k") {
event.preventDefault();
instance.open();
}
});
</script>
```
## Example
![demo](./screenshot.png)
[Demo](https://search-modal.msar.me/)
## To Do

@@ -56,3 +84,3 @@

This project was inspired from by algolia DocSearch modal which is tightly binded with algolia, that's why we write this package to provide smooth search experience.
The design provided by @atiq-ur and developed by @4msar
The design provided by [Atiqur Rahman](//github.com/atiq-ur) and developed by [Saiful Alam](//github.com/4msar)

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