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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pintomiguelernesto/tracer

v0.0.4

Published

![Tracer Component](./src/assets/plot-function-1.png)

Readme

Tracer Component

Tracer Component

A Flexible function tracer for Vue 3, allowing users to plot mathematical expressions, manipulate variables in real-time, and perform calculus operations.

Advanced Usage: External Control

You can also control the Tracer component externally (e.g., from a sidebar) by using a ref to access its exposed methods, such as setExpr.

<script setup>
import { ref } from 'vue'
import Tracer from '@ernestopinto/tracer'

const functions = ref({ /* ... */ })
const tracerRef = ref(null)

function updateFromOutside(expression, name) {
  // Directly set the expression and function name
  tracerRef.value?.setExpr(expression, name)
}
</script>

<template>
  <Tracer v-model:defs="functions" ref="tracerRef" />
  <button @click="updateFromOutside('x^3', 'Cubic')">Set to x^3</button>
</template>

Main Features

Plot Capabilities

  • Dynamic Plotting: Renders mathematical functions of x (e.g., A*sin(B*x - C)) using function-plot.
  • Real-time Variables: Define and manipulate variables (A, B, C, etc.) via interactive sliders, with immediate plot updates.
  • Interactive Navigation:
    • Zoom: Use the mouse wheel to zoom in and out of the plot.
    • Pan: Click and drag to navigate through different areas of the coordinate system.
  • Resizable Container: The plot area is both vertically and horizontally resizable with a custom, highly visible handle.
  • Export to PNG: High-quality export of the current plot, including the function expression and any calculated results (zeros, extrema, integral).
  • Responsive Design: Adapts to different screen sizes with a clean, Tailwind-based UI.
  • Customizable Visibility: Hide or show specific sections (Axis Bounds, Variables, Calculus, Expression Input) via component props.

Calculus Features

  • Zero Finding: Numerically find and highlight the zeros (roots) of the function within the visible X-axis bounds.
  • Extrema Detection: Identify and mark local maxima and minima of the expression.
  • Numerical Integration:
    • Approximate the definite integral between two custom bounds.
    • Visual representation of the integration interval on the plot.
  • Point Highlighting: Clicking on calculated results (zeros or extrema) highlights the exact point on the plot for better visualization.

Usage

<script setup>
import { ref } from 'vue'
import Tracer from '@ernestopinto/tracer'

const functions = ref({
  f: [
    { name: "Sine Wave", f: "A*sin(B*x)" }
  ],
  d: {
    axxis: true,
    vars: true,
    calc: true,
    expr: true
  }
})
</script>

<template>
  <Tracer v-model:defs="functions" />
</template>