# hermeslib

> HermesJS

Latest version **1.0.27** (published 2022-08-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install hermeslib
pnpm add hermeslib
yarn add hermeslib
bun add hermeslib
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.27 |
| Published | 2022-08-24 |
| First published | 2022-08-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 42 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | fellipefvs |

## Links

- npm: https://www.npmjs.com/package/hermeslib
- Homepage: https://github.com/fellps/hermesjs
- npm.io page: https://npm.io/package/hermeslib

## Recent versions

- 1.0.27 (latest) — 2022-08-24
- 1.0.26 — 2022-08-24
- 1.0.25 — 2022-08-24
- 1.0.24 — 2022-08-24
- 1.0.23 — 2022-08-24
- 1.0.22 — 2022-08-24
- 1.0.21 — 2022-08-24
- 1.0.20 — 2022-08-24
- 1.0.19 — 2022-08-24
- 1.0.18 — 2022-08-24
- 1.0.16 — 2022-08-24
- 1.0.14 — 2022-08-24
- 1.0.12 — 2022-08-24
- 1.0.11 — 2022-08-24
- 1.0.10 — 2022-08-24
- … 9 more at https://npm.io/package/hermeslib/versions

## README

# HERMESJS

- Library for polling Hermes messages.

## Install

```shell
npm install hermeslib

or

yarn add hermeslib
```

## Usage

```js
import React from "react";
import "react-notifications/lib/notifications.css";
import { Cron } from "hermeslib";

function App() {
  return (
    <div>
      <Cron
        endpoint="https://localhost:8080/poll/{recipient}"
        cronTime="0/30 * * * * *" //Run every 30 seconds
        defaultNotification
        callback={(err, data) =>
          console.log(`error: ${err}, data: ${data}`)
        }
      />
    </div>
  );
}

export default App;
```

## Properties

| Name                | Type     | Required | Default        | Description                                                                                      |
| ------------------- | -------- | -------- | -------------- | ------------------------------------------------------------------------------------------------ |
| endpoint            | string   | true     | -              | Endpoint to poll messages                                                                        |
| cronTime            | string   | false    | \* \* \* \* \* | Cron time string format (https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules) |
| callback            | function | false    | -              | Function that will be called after receiving a message. (`error`: boolean, `data`: object)       |
| defaultNotification | boolean  | false    | false          | Displays the default notifications imbedded in the library                                       |


## Default Notification

<img src="https://s4.gifyu.com/images/Peek-24-08-2022-11-45.gif" style="width: 100%;" />

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