sunwatcher

1.0.1 • Public • Published

sunwatcher

This node.js library watches the current position of the sun and emits events upon sunset and sunrise.

Example

var sunwatcher = new Sunwatcher(
    52.384353,
    4.894542
);

sunwatcher.on("sunrise", function(now, sunrise, sunriseEnd) {
    // Do something while the sun is rising
}

sunwatcher.on("sunset", function(now, sunsetStart, sunset) {
    // Do something while the sun is setting
}

Readme

Keywords

none

Package Sidebar

Install

npm i sunwatcher

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • pascaldevink