# node-slack-es6

> A Node.js Slack masseging model written all in ES6!

Latest version **1.0.4** (published 2017-08-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-slack-es6
pnpm add node-slack-es6
yarn add node-slack-es6
bun add node-slack-es6
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-08-15 |
| First published | 2017-03-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Puttpotsawee |
| Maintainers | nf-solution |
| Keywords | slack, node |

## Links

- npm: https://www.npmjs.com/package/node-slack-es6
- Repository: https://github.com/nodeframe/node-slack-es6
- Homepage: https://github.com/nodeframe/node-slack-es6#readme
- Issues: https://github.com/nodeframe/node-slack-es6/issues
- npm.io page: https://npm.io/package/node-slack-es6

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^1.6.3

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2017-08-15
- 1.0.3 — 2017-08-15
- 1.0.2 — 2017-03-15
- 1.0.1 — 2017-03-15
- 1.0.0 — 2017-03-15

## README

node-slack-es6
==============
a node module for pushing messages to [Slack](https://slack.com) via Webhook api.

Unlike other module, This node module is written all in **ES6** and it return **Promise**!

Moreover, this module is full of TEST!

Usage
----------
This module is written all in **ES6** syntax. Using it will require es6 project compile with [babel](https://babeljs.io/).

to start using slack push just importing it

    import {Slack} from 'node-slack-es6'

then initiate your class with your default setting

    let sl = new Slack({
        webhook_url: 'your webhook get from slack',
        username: 'username for this push message to be shown',
        channel: 'channel to push to',
    })

and then, your class is ready to go!

when it time for you to push the message to Slack, just call this

    sl.send({...})

and push your data object! this will send the request and catch the response

Good News! this module is all in ES6 and it return `Promise` !!
so to grab your response just to the promise chain

    sl.send({..})
      .then(() => {// for success})
      .catch((e) => {// for error exception})


Middleware mongooes error is send to slack

    const service = 'APPLICAITON-SERVICE'
    const error = new Error()
    const callback = function(){}
    sl.mongooseOnError(service, error, callback)

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