A JavaScript library for calculating moon phases, illumination, distance, and upcoming lunar events.
Lune.js is a JavaScript library that calculates moon phases, illumination percentages, distances, and upcoming lunar events. It solves the problem of needing accurate astronomical moon data in web and Node.js applications without implementing complex calculations from scratch.
Developers building applications that require lunar data, such as calendar apps, astronomy tools, weather applications, or educational software.
Developers choose Lune.js for its simple API, accurate calculations, and lightweight implementation that doesn't require external dependencies or complex setup.
:new_moon: Lune.js — Calculate the phases of the moon
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The library has no external dependencies and is installed via a simple npm command, making it easy to integrate into projects without bloating bundle size.
It provides multiple precise data points like phase, illuminated fraction, age, distance, and angular diameters, as shown in the sample outputs, ensuring reliable lunar information.
Functions such as phase() for current data and phase_hunt() for recent phases are straightforward to use, with clear examples in the README demonstrating minimal code complexity.
Supports calculations for any specific date or date ranges, allowing queries for historical and future lunar phases, as evidenced by the phase_range() function for searching between dates.
The library only returns raw numerical data, requiring developers to implement their own graphical representations or UI components for displaying moon phases.
It focuses exclusively on moon phases and related data, lacking support for other celestial phenomena like sun positions, planetary movements, or moon rise/set times.
Output dates include timezone-specific strings (e.g., EST, EDT), which may complicate handling in applications requiring universal time (UTC) or robust internationalization.