npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

insomnia-plugin-query

v1.0.1

Published

Insomnia Plugin Template tag: Query

Downloads

1,483

Readme

Query Plugin

About

This plugin adds query template tag to your Insomnia, which can provide values from requests or responses, using a LinQ-like query syntax.

How to install

Using Insomnia Hub: You can navigate to Insomnia Plugin Hub Page and search for Query plugin, Open the details page and click Install Plugin button. This throw an installation link which you can open with your insomnia on your desktop.

Directly installing the zip file:: You can download project zip file from github. Then extract the content into a directory at your insomnia's plugin's directory.

Using Insomnia Application: You can Open your insomnia application, go to Preferences menu, open the plugins tab and enter the name insomnia-plugin-query into text box, the click Install Plugin button.

How to use

By clicking the created template tag, you can edit parameters:

  • Target Request: the request which would be searched for values.
  • Json Query: This would be a query you write to find your target field
  • Trigger Behavior: Here you can select whether or not to re send the target request.

Consider you have the following response for a request to Json Place Holder

[
  {
    "userId": 1,
    "id": 1,
    "title": "delectus aut autem",
    "completed": false
  },
  {
    "userId": 1,
    "id": 2,
    "title": "quis ut nam facilis et officia qui",
    "completed": false
  },
  {
    "userId": 1,
    "id": 3,
    "title": "fugiat veniam minus",
    "completed": false
  },
  {
    "userId": 1,
    "id": 4,
    "title": "et porro tempora",
    "completed": true
  },
  {
    "userId": 1,
    "id": 5,
    "title": "laboriosam mollitia et enim quasi adipisci quia provident illum",
    "completed": false
  }
]

and now you want to find the id for an item with the title fugiat veniam minus. For that, you can write a query like: $.(@title == 'fugiat veniam minus').id. This query would be evaluated to 3.

$ means the whole response/request data. you can go one step deeper into the data structure with a dot. Or you can put a query using parentheses. when writing a query, you would provide an binary condition which might be true for a number of items. in this case, the first matching item would be selected. then you can keep going deeper to select the target field from the item.

In the given example, @title == 'fugiat veniam minus' selects items with title equal to 'fugiat veniam minus',then the .id part will select it's id property, therefor the Query template tag will be evaluated to 3.