Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 563 Bytes

README.md

File metadata and controls

27 lines (18 loc) · 563 Bytes

simple-moonphase-js

npm

A simple tool to calculate the phase of the moon given a date.

Install

$ npm install @t1mwillis/simple-moonphase-js

Usage

const moonPhase = require("@t1mwillis/simple-moonphase-js");

const date = new Date('June 07, 2019');

moonPhase(date);
//=> "Waxing Crescent"

moonPhase(1337);
//=> Uncaught TypeError: Tiny wants a string!
//    at tiny (<anonymous>:3:41)
//    at <anonymous>:1:1