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

@fusionstrings/swiss-eph

v0.1.1

Published

Swiss Ephemeris WASM binding for Deno, Node.js and Browser

Readme

@fusionstrings/swiss-eph

Swiss Ephemeris astronomical calculation library compiled to WebAssembly for cross-platform JavaScript/TypeScript usage, with idiomatic Rust bindings.

crates.io docs.rs License: AGPL-3.0

Features

  • Cross-platform: Works in Deno, Node.js, browsers, and edge runtimes (Cloudflare Workers)
  • Rust Bindings: Complete FFI and safe Rust API for native performance
  • High precision: Bit-level accuracy matching native Swiss Ephemeris calculations
  • Complete API: 95+ functions for planetary positions, houses, eclipses, and more
  • Zero dependencies: Self-contained WASM module with built-in Moshier ephemeris
  • TypeScript: Full type definitions with TSDoc documentation

Installation (JS/TS)

Deno / JSR

import { load } from "jsr:@fusionstrings/swiss-eph";

Node.js / npm

npm install @fusionstrings/swiss-eph
import { load } from "@fusionstrings/swiss-eph";

Quick Start (JS/TS)

import { Constants, load } from "@fusionstrings/swiss-eph";

// Initialize the Swiss Ephemeris
const eph = await load();

// Calculate Julian Day for a date
const jd = eph.swe_julday(2024, 6, 15, 12.0, Constants.SE_GREG_CAL);

// Get Sun's position
const { xx, error } = eph.swe_calc_ut(
  jd,
  Constants.SE_SUN,
  Constants.SEFLG_SPEED,
);
console.log(`Sun longitude: ${xx[0]}°`);

Rust Usage

Add this to your Cargo.toml:

[dependencies]
swiss-eph = "0.1.0"

Quick Start (Rust)

use swisseph_x::safe::*;
use swisseph_x::*;

fn main() {
    let jd = julday(2024, 1, 1, 12.0);
    let flags = CalcFlags::new().with_speed();
    let sun = calc(jd, SE_SUN, flags).unwrap();
    println!("Sun longitude: {:.6}°", sun.longitude);
}

API Overview (JS/TS)

| Function | Description | | ------------------------------ | --------------------------- | | swe_calc / swe_calc_ut | Planetary positions (TT/UT) | | swe_houses / swe_houses_ex | House cusps and angles | | swe_julday / swe_revjul | Julian Day conversions | | swe_sidtime | Sidereal time | | swe_deltat | Delta T (TT - UT) |

License

AGPL-3.0 - Same license as the Swiss Ephemeris library.

This software is based on the Swiss Ephemeris by Astrodienst AG. See https://www.astro.com/swisseph/ for more information.

Credits

  • Swiss Ephemeris by Astrodienst AG
  • WASM compilation using WASI SDK and wasmbuild