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 🙏

© 2025 – Pkg Stats / Ryan Hefner

spicey

v0.0.14

Published

Run [SPICE](https://en.wikipedia.org/wiki/SPICE) simulations in native javascript. An alternative to [ngspice](https://ngspice.sourceforge.io/)

Downloads

36,927

Readme

spicey

Run SPICE simulations in native javascript. An alternative to ngspice

npm version

import { simulate, formatAcResult } from "spicey"

const net1 = `
Demo of a simple AC circuit

v1 1 0 dc 0 ac 1
r1 1 2 30
c1 2 0 100u
.ac dec 100 1 100

.end
`

const result1 = simulate(net1)

formatAcResult(result1.ac)
`
  "f(Hz), 1:|V|,∠V(deg), 2:|V|,∠V(deg)
  1.00000, 1.00000,0.00000, 0.999822,-1.07987
  1.02329, 1.00000,0.00000, 0.999814,-1.10502
  1.04713, 1.00000,0.00000, 0.999805,-1.13075
  1.07152, 1.00000,0.00000, 0.999796,-1.15708
  1.09648, 1.00000,0.00000, 0.999786,-1.18403
  1.12202, 1.00000,0.00000, 0.999776,-1.21160
  1.14815, 1.00000,0.00000, 0.999766,-1.23981
  1.17490, 1.00000,0.00000, 0.999755,-1.26868
  1.20226, 1.00000,0.00000, 0.999743,-1.29822
  ..."
`)

Proposed directory structure

To make it easy to extend the simulator (for example to add transistor models later), the library is now organized into focused modules:

lib/
  analysis/            # High-level simulation entry points (simulate, simulateAC, simulateTRAN)
  constants/           # Shared numeric constants
  formatting/          # Result formatting helpers
  math/                # Numeric utilities such as Complex arithmetic and matrix solvers
  parsing/             # Netlist parsing and circuit data structures
  stamping/            # Matrix/RHS stamping helpers for modified nodal analysis
  utils/               # Generic helpers (e.g., logarithmic sweeps)

Each exported function lives in its own file with a matching name, so new capabilities can be added without creating monolithic modules.