Package Exports
- daytime-alarm
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (daytime-alarm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Daytime alarm
Set an (recurring) alarm at a daytime.
Installation
$ npm i daytime-alarm
Usage
import daytimeAlarm from "daytime-alarm"
// Alarm hits next time the clock shows 15:35:30
let alarm = daytimeAlarm("15:35:30").onAlarm((time) => {
console.log("Alarm" + time) // "Alarm 15:35:30"
})
On / Off
alarm.cancel()
post("/activateAlarm", () => {
alarm.start()
})
Repeat
alarm.repeat("daily")
post("/noLongerRepeat", () => {
alarm.once()
})
Contribute
All feedback is appreciated. Create a pull request or write an issue.