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

@symbolism/cli

v0.3.0

Published

Coverage assertions for specific code tokens.

Downloads

7

Readme

symbolism

Typescript symbol inspection/assertion tools.

npm install -g @symbolism/cli
symbolism --help

Features

Call static argument resolution (beta)

Document all of the inputs to a function. Evaluates the function call hierarchy and resolves all of the static arguments.

symbolism callInputs ./packages/test/src/dump-symbol.ts Schema

Code use test coverage

Ensure that critical code in your project has test coverage based on what is is rather than where it is. Test all of your analytics calls, critical API usage, etc. without resorting to requiring 100% coverage.

symbolism coverage

Output for defineSymbol.

defineSymbol: 85.19% covered (23/27)
  Missing:
    defineSymbol: ./packages/definitions/src/class.ts:33:14
    defineSymbol: ./packages/definitions/src/index.ts:166:12
    defineSymbol: ./packages/definitions/src/jsx.ts:17:12
    defineSymbol: ./packages/definitions/src/jsx.ts:23:12

See config section below for setup details.

Static schema extraction

Document the schema of your typescript data types. Calculates the final schema for your data types, merged interfaces.

symbolism dumpSchema ./packages/test/src/dump-symbol.ts Schema

Output:

{
  bar: "bar" | "bat";
  merged: number;
};

For a machine JSON Schema readable format, use the --json flag.

Config

WIP

{
  "tokens": [
    "function-call",
    "function-call-with-args",
    { "name": "myOtherFunction", "min": 0.9 }
  ],
  "min": 1
}
  • tokens: A list of tokens to assert coverage for. Objects may be used to override the default config for those tokens. Any top-level config value may be set here.
  • min: [0-1] The minimum percentage of token references required for the assertion to pass.

https://github.com/facebook/jest/issues/11188