# daytime-alarm

> Set an (recurring) alarm at a daytime.

Latest version **1.1.1** (published 2021-11-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install daytime-alarm
pnpm add daytime-alarm
yarn add daytime-alarm
bun add daytime-alarm
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2021-11-06 |
| First published | 2020-09-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 223.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maximilian Mairinger |
| Maintainers | zzrv |
| Keywords | daytime, alarm, clock, recurring, timeout, time, event, fire, day |

## Links

- npm: https://www.npmjs.com/package/daytime-alarm
- Repository: https://github.com/maximilianMairinger/daytimeAlarm
- Homepage: https://github.com/maximilianMairinger/daytimeAlarm#readme
- Issues: https://github.com/maximilianMairinger/daytimeAlarm/issues
- npm.io page: https://npm.io/package/daytime-alarm

## Dependencies (4)

- [josm](https://npm.io/package/josm.md) ^1.1.18
- [xtring](https://npm.io/package/xtring.md) ^1.2.0
- [nth-check](https://npm.io/package/nth-check.md) ^2.0.1
- [long-timeout](https://npm.io/package/long-timeout.md) ^0.1.1

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2021-11-06
- 1.1.0 — 2021-11-06
- 1.0.2 — 2021-11-05
- 1.0.1 — 2021-11-05
- 1.0.0 — 2020-09-12
- 0.0.1 — 2020-09-11

## README

# Daytime alarm

Set an (recurring) alarm at a daytime.

## Installation

```shell
 $ npm i daytime-alarm
```

## Usage

```ts
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

```ts
alarm.cancel()

post("/activateAlarm", () => {
  alarm.start()
})
```

### Repeat

```ts
alarm.repeat("daily")

post("/noLongerRepeat", () => {
  alarm.once()
})
```

## Contribute

All feedback is appreciated. Create a pull request or write an issue.

---
_Source: https://npm.io/package/daytime-alarm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
