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

@astrologer/ephemera

v0.4.1

Published

Pocket-sized ephemeris for astrology and astronomy: planets, Moon, Chiron, nodes, houses, ayanamsas, stars, eclipses, Uranian points and 1,000+ asteroids in a 49 KB WebAssembly core, no dependencies, MIT.

Readme

@astrologer/ephemera

A pocket-sized, MIT-licensed ephemeris for astrology and astronomy. JPL-grade planetary positions, houses, ayanamsas, eclipses, fixed stars and 1,000+ asteroids, in a 49 KB WebAssembly core with no dependencies. It works in Node 18+, browsers and bundlers.

  • Tiny: 49 KB core plus 145 KB of planetary data, built in by default.
  • Accurate: within 0.6″ of NASA JPL's DE440 over 1550–2650, or 0.03″ with the high-precision tables.
  • MIT licensed: use it in closed-source and commercial apps.
  • Complete for astrology: 14 house systems, 42 ayanamsas, nodes and Lilith, Uranian points, eclipses, returns and stations, sidereal returns, planetary nodes and apsides, and 411 fixed stars.
  • Independently verified against JPL, NASA's eclipse canon and India's official ephemeris. See the accuracy page.
import { createEphemera, Body, HouseSystem, Ayanamsa } from '@astrologer/ephemera';

const eph = await createEphemera();                 // 1" data built in
const jd = eph.julianDate(2026, 1, 1.5);           // UT
const moon = eph.position(Body.Moon, jd);          // degrees, AU, per day
const cusps = eph.houses(jd, -0.1278, 51.5074, HouseSystem.Placidus);
const lahiri = eph.ayanamsa(Ayanamsa.Lahiri, eph.utToTt(jd, 2026));

Angles are in degrees and times are Julian days, UT or TT as each method's name says. Besides positions, houses (housesInfo also reports the polar fallback to Porphyry), ayanamsas, searches, eclipses and stars (starCount, starName, ...), there are the time and frame helpers: utcToJd, calendarDate, ttToUt, siderealTime, equationOfTime, nutation, eclipticToEquatorial (declination for parallels), heliocentric, midpoint and splitLongitude. For sidereal returns and ingresses pass { ayanamsa: Ayanamsa.Lahiri } (or a custom { jdT0, valueAtT0 }) to longitudeCrossing or heliocentricCrossing. index.d.ts documents them all.

Modules and data

createEphemera({ module, data }) picks a WebAssembly module and adds data files from the package:

| module | Size (brotli) | Data built in | |---|---|---| | '1as' (default) | 162 KB | 1" series, 1550–2650 | | '1as-chiron' | 217 KB | the same plus Chiron | | 'core' | 49 KB | none: pass data | | 'lite' | 42 KB | none; no eclipses or fixed stars |

The data names are '1as', '01as' (~0.2"), 'chiron', '1as-chiron', '01as-chiron', 'asteroids' (Ceres–Vesta and Chiron) and 'stars'. Raw bytes work too, e.g. a DE440 table (~0.002") from the repository's data/de440/:

const eph = await createEphemera({ module: 'core', data: ['01as', 'stars', tableBytes] });

Minor planets

More asteroids, centaurs and TNOs (1900–2100, ~0.5″) come in two optional files from the repository, not in this package:

  • eph-minor.bin, 180 popular bodies, 5.7 MB;
  • eph-minor-1000.bin, numbered 1–1000, 17 MB.
const url = 'https://raw.githubusercontent.com/intellecat/ephemera/main/data/eph-minor.bin';
const minor = new Uint8Array(await (await fetch(url)).arrayBuffer());
const eph = await createEphemera({ data: [minor] });
const eros = eph.minorBody('Eros');          // or '433', '433 Eros'
const pos = eph.position(eros, jd);

In a browser without a bundler, serve the package directory and createEphemera() fetches the files next to index.mjs. demo.html is a small example page.

More

The C library, the accuracy figures, the methods and the references are in the main repository: https://github.com/intellecat/ephemera. License: MIT.