# message-js

> Simple message util

Latest version **0.0.5** (published 2015-09-14) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2015-09-14 |
| First published | 2015-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Naman Kalkhuria |
| Maintainers | knaman2609 |
| Keywords | message, notification |

## Links

- npm: https://www.npmjs.com/package/message-js
- Repository: https://github.com/knaman2609/message.js
- Homepage: https://github.com/knaman2609/message.js#readme
- Issues: https://github.com/knaman2609/message.js/issues
- npm.io page: https://npm.io/package/message-js

## Dependencies (1)

- [jquery](https://npm.io/package/jquery.md) latest

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2015-09-14
- 0.0.4 — 2015-09-14
- 0.0.3 — 2015-09-14
- 0.0.2 — 2015-09-14
- 0.0.1 — 2015-09-14
- 0.0.0 — 2015-09-14

## README

## Message js
![](message.png)
#### Install
 
    npm install message-js    
    var Message = require('message-js');

if not using browerify/webpack simply copy message.js and message.css.

See the example in `example` folder.

#### Usage

```javascript
var message = Message(); // returns the same message obj every time.

 // use this to create new  message each time
message.create({
    _class: 'message--error',
    header: 'Error',
    body: 'Something bad happened.',
}).open();
```


#### Html generated

```html
<div class="message is-active">
    <div class="message__header"></div>
    <div class="message__close">X</div>
    <div class="message__body"></div>
</div>
```

#### Css 
Copy the css from message.css. `is-active` class is appled on open.


#### Close
```javascript
message.close(); // close immediately
message.close(2000); // to close after 2000ms
```

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