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

messier-api

v1.0.1

Published

Messier catalog API that provides data and images for all 110 Messier objects.

Readme

messier-api

by Osric Dienda

Messier catalog API that provides data and images for all 110 Messier objects. To download for Node.js, run:

$ npm install messier-api

 

After installing the package, import the library using require or import.

const messier = require('messier-api');

 

To access data on the Messier objects, access messier.data or use messier.getMessier().

console.log(messier.data.M45.name);
console.log(messier.getMessier(45).name);

 

Messier object attributes:

| Attribute | Description | Code Example | | ----------|-------------|--------------| | messierNumber | The Messier number of the object. | messier.data.M45.messierNumber | | name | The common name of the Messier object. If none exists, NGC number or description is used instead. | messier.data.M45.name | | alternateNames | An array of the object's alternate names. Most have no alternate names (empty array). | messier.data.M45.alternateNames | | NGC | The New General Catalog (NGC) or Index Catalog (IC) of the Messier object. Some objects have none (undefined). | messier.data.M45.NGC | | type | Classifies objects into 12 different types: Diffuse Nebula, Double Star, Elliptical Galaxy, Globular Cluster, Group/Asterism, Irregular Galaxy, Lenticular (S0) Galaxy, Open Cluster, Planetary Nebula, Spiral Galaxy, Star Cloud, Supernova Remnant. | messier.data.M45.type | | constellation | The name of the constellation the Messier object is in. | messier.data.M45.constellation | | rightAscension | The right ascension of the Messier object. (hh:mm:ss.ss) | messier.data.M45.rightAscension | | declination | The declination of the Messier object. (±dd:mm:ss.ss) | messier.data.M45.declination | | magnitude | The apparent magnitude of the Messier object. | messier.data.M45.magnitude | | size | The apparent dimensions of the Messier object in arcminutes (W' x H'). If elliptical, only the angular diameter is given (D'). | messier.data.M45.size | | distance | The distance of the Messier object from Earth in light-years. | messier.data.M45.distance | | viewingSeason | The best season to view the Messier object from the Northern Hemisphere. | messier.data.M45.viewingSeason | | viewingDifficulty | How hard it is to view the Messier object, classified as either: Very Easy, Easy, Moderate, Hard, Very Hard. | messier.data.M45.viewingDifficulty |