Do stuff when the sun is down.
npm install --save nightmode
var nightmode = require('nightmode')
// Specify coordinates and date
nightmode(['51.5', '-0.1'], new Date()).then(() => {
// do stuff
})
// or leave blank and use today's date and navigator.geolocation
nightmode().then(() => {
// do stuff
})
MIT
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Crafted with <3 by Simon Brix (@br11x).
This package was initially generated with yeoman and the p generator.