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

@eveshipfit/fitting

v2.2.1

Published

EVE Online ship fits that recalculate themselves

Downloads

1,345

Readme

@eveshipfit/fitting

EVE Online ship fits that recalculate themselves, on top of @eveshipfit/dogma-engine.

Part of EVEShip.fit.

Install

npm install @eveshipfit/fitting @eveshipfit/dogma-engine @eveshipfit/esi @eveshipfit/sde-loader @eveshipfit/sde

Usage

The examples use Vite's ?url imports to get the URL of a data file.

import wasmUrl from "@eveshipfit/dogma-engine/esf_dogma_engine_bg.wasm?url";
import { createEngine } from "@eveshipfit/fitting";
import sdeUrl from "@eveshipfit/sde/dist/sde.dat?url";
import { loadSde } from "@eveshipfit/sde-loader";

const engine = await createEngine(await loadSde({ url: sdeUrl }), { wasm: wasmUrl });

const fit = engine.createFit({ ship: 587 }); // a Rifter
fit.fit(engine.sde.typeByName("200mm AutoCannon II")!.id); // first free high slot
fit.fit(engine.sde.typeByName("EMP S")!.id); // loaded into every gun that takes it
fit.move(0, { type: "high", index: 2 }); // to another slot, swapping with what is there

const { stats } = fit.getSnapshot();
stats.ship.get("cpuLoad");
stats.slots.high; // { used: 1, total: 3 }
stats.violations; // the fitting rules the fit breaks

fit.undo();

The engine can hold only one SDE per page; createEngine with another one throws.

A fit is flown by a character with every skill at V, unless you pass another to createFit or setCharacter.

loadLink reads the fit of an EVEShip.fit link, or of dna:<dna>. A killmail link needs an Esi of @eveshipfit/esi in createEngine's esi option.

React

subscribe and getSnapshot are bound, so a store goes straight into useSyncExternalStore:

const { fit, stats } = useSyncExternalStore(store.subscribe, store.getSnapshot);

Every change gives a new snapshot; old ones never change.

Previews

preview shows what an edit would do, without doing it:

const { before, after } = fit.preview((draft) => draft.fit(typeId));
after.stats.ship.get("cpuLoad")! - before.stats.ship.get("cpuLoad")!;

Rules

placementOf, canFit, acceptsCharge and chargesFor say where a type goes, whether a module fits a hull, and which charges go in a module; for example to filter a market browser. droneRoom says how many more drones of a type can be active. fighterKind, squadronSize and tubeTakes say which tubes a fighter takes, how big its squadron is, and whether a tube can launch it. modesOf gives the modes of a ship, like a tactical destroyer's; a FitStore keeps its fit in one of them, which setMode switches.

missingSkills says which skills a character lacks to use some types, with the skills those skills need; typesInUse gives the types of a fit that need them.

fitPrice says what a fit costs at a price per type, without implants and boosters.

License

MIT