New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

insomnia-plugin-response-search-counter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

insomnia-plugin-response-search-counter

An Insomnia plugin that shows the count of search term matches in the response viewer

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Insomnia Response Search Counter Plugin

A plugin for Insomnia that shows the count of search term matches in the response viewer.

Features

  • Shows number of matches for search terms in response content
  • Works with all response types (JSON, XML, Text, etc.)
  • Real-time count updates as you type
  • Supports multiple tabs - updates when switching between tabs
  • Case-insensitive search

Installation

From Insomnia Plugin Hub

  • Open Insomnia
  • Go to Application > Preferences > Plugins
  • Type "insomnia-plugin-response-search-counter"
  • Click "Install Plugin"

Using npm

npm install -g insomnia-plugin-response-search-counter

Local Development

  • Clone this repository:
git clone https://github.com/manisha-singh-hyd/insomnia-plugin-response-search-counter.git
cd insomnia-plugin-response-search-counter
  • Install dependencies:
npm install
  • Build the plugin:
npm run build
  • Link the plugin to Insomnia:
    • Insomnia only loads plugins from its plugins directory
    • Instead of copying files manually, we create a symbolic link
    • This lets you develop in your preferred location while Insomnia sees the plugin in its directory
    • Any changes you make will be immediately available to Insomnia after rebuilding
# macOS: Create symbolic link in Insomnia's plugins directory
ln -s "$(pwd)" ~/Library/Application\ Support/Insomnia/plugins/insomnia-plugin-response-search-counter

# Windows: Create symbolic link in Insomnia's plugins directory
mklink /D "%APPDATA%\Insomnia\plugins\insomnia-plugin-response-search-counter" "%CD%"

Usage

  • Send a request in Insomnia
  • In the response viewer, use either:
    • The search box in the response viewer
    • Keyboard shortcut (Cmd+F on macOS, Ctrl+F on Windows/Linux)
  • The count of matches will appear next to the search box
  • When switching between tabs, the counter automatically updates for the current response

Search Results Display

When searching in the response viewer, the match count is displayed in a clear format:

Search Results Counter

As shown in the screenshot above, the plugin displays the total number of matches (110 matches) for the search term "displayName". The count updates in real-time as you type, making it easy to see how many occurrences of your search term exist in the response.

How It Works

  • Maintains a single cached response that updates when:
    • New API responses are received
    • Switching between tabs
  • Uses MutationObserver to detect tab changes
  • Cleans up properly when:
    • Closing search
    • Switching tabs
    • Unloading plugin

Development

  • Make changes to the source code
  • Run npm run build to rebuild the plugin
  • Restart Insomnia to load the changes

Testing

To test the plugin:

  • Follow the Local Development installation steps
  • Restart Insomnia to load the plugin
  • Test the following scenarios:
    • Search in a single response
    • Switch between tabs with different responses
    • Close and reopen search
    • Make new requests and verify counter updates
  • After making code changes:
    • Run npm run build
    • Restart Insomnia
    • Test your changes

Publishing

To publish a new version to npm:

  • Update version in package.json
  • Build the plugin:
npm run build
  • Publish to npm:
npm publish

The plugin will be available in the Insomnia Plugin Hub after publication.

License

MIT

Keywords

insomnia

FAQs

Package last updated on 23 Jun 2025

Did you know?

Socket

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.

Install

Related posts