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

does-it-throw-lsp

v0.5.0

Published

Language Server for Does It Throw

Downloads

4

Readme

Well, Does it Throw?

TLDR; This is a blazingly fast lsp server to find throw statements in your javascript code. It's written in Rust and based on SWC 🔥. It works for most ECMAScript files, such as .ts, .js, .tsx and .jsx.

Check it out in action:

demo

Also supports call expressions:

demo

Why?

Maybe you're working on a large codebase riddled with throw statements everywhere, and you want a better control flow. Or perhaps you're just curious about how many throw statements you have in your codebase. This simple tool can help you with that.

Untyped throw statements can be a pain for those who come from languages like Go, where errors are typically values and first-class citizens. Even Rust has the Result type. Knowing where throw statements are in your codebase might be helpful, even if their return types aren't directly supported.

This extension may not be for everyone, but it's definitely for me. I hope you find it useful too.

Installation

| Platform | Installation | | -------- | ------------ | | VsCode | Marketplace | | Neovim | Neovim Installation Docs | | LSP Server | NPM | | JetBrains | Marketplace |

This extension is built with security in mind. It doesn't send any data to any third party servers. All publishes are done via a signed immutable commit from the CI pipeline.

The core of the code is written in Rust, and the LSP implementation for VsCode is written in Typescript. The Rust code is compiled to WASM and bundled with the VsCode extension. The extension is published to the VsCode marketplace, and the Rust code is published to crates.io.

Usage

For a usage and configuration guide, check out the usage page!

Limitations

  • This extension is still in its early stages. It's not perfect, but hope to gain sufficient ECMAScript coverage over time.
  • Currently, it only supports ECMAScript files and the following file types: .ts, .js, .tsx and .jsx.
  • Call expression tracing (Aka "Calls to Throws") is now set to one level deep. Hope to make this configurable in the future!

To view all known limitations, please see the issues page.

Contributing

Contributions are certainly welcome! Please open an issue or submit a PR. If you find a use case that isn't supported yet, please search the open issues and open a new one if it doesn't exist.

Dev Setup

Everything can be found in the CONTRIBUTING.md file!

Feedback & Suggestions

Please use the GitHub discussions tab to provide feedback and suggestions. Thanks!

Acknowledgements

License

MIT - See LICENSE for more information.