# vanilla-message

> > Size < 1kb

Latest version **1.1.6** (published 2021-11-10) · 0 weekly downloads

## Install

```sh
npm install vanilla-message
pnpm add vanilla-message
yarn add vanilla-message
bun add vanilla-message
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2021-11-10 |
| First published | 2019-10-26 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 168.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | ymblender |

## Links

- npm: https://www.npmjs.com/package/vanilla-message
- Repository: https://github.com/ymzuiku/vanilla-message
- Homepage: git+https://github.com/ymzuiku/vanilla-message.git
- Issues: git+https://github.com/ymzuiku/vanilla-message.git
- npm.io page: https://npm.io/package/vanilla-message

## Recent versions

- 1.1.6 (latest) — 2021-11-10
- 1.1.5 — 2021-11-10
- 1.1.4 — 2021-04-23
- 1.1.3 — 2021-01-16
- 1.1.2 — 2020-12-31
- 1.1.1 — 2020-12-28
- 1.1.0 — 2020-12-28
- 1.0.0 — 2020-12-28
- 0.5.0 — 2020-12-28
- 0.4.0 — 2020-12-28
- 0.3.0 — 2020-12-27
- 0.2.2 — 2020-08-02
- 0.2.1 — 2020-08-02
- 0.2.0 — 2020-08-02
- 0.1.4 — 2020-08-02
- … 4 more at https://npm.io/package/vanilla-message/versions

## README

# vanilla-message

> Size < 1kb

## Install

```sh
$ npm install --save vanilla-message
```

## Use

```js
import Message from "vanilla-message";

Message.error("hello");
Message.success("hello");
Message.info("hello", "Ok");
Message.info("hello", "Ok", "Cancel");

Message("hello", {
  ok: "确定",
  cancel: "取消",
  timeOut: 5000,
  style: {
    background: "#f55",
  },
});
```

## Await message closse

```ts
import Message from "vanilla-message";

Message.error("hello");
Message.success("hello");
Message.info("hello", "Ok");
Message.info("hello", "Ok", "Cancel");

async function handleMessage() {
  const ok = await Message("hello", {
    ok: "确定",
    cancel: "取消",
    timeOut: 5000,
    style: {
      background: "#f55",
    },
  });

  console.log("You click ok:", ok);
}
```

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