# webcom-as-promised

> Promise wrapper for webcom library

Latest version **1.2.3** (published 2018-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install webcom-as-promised
pnpm add webcom-as-promised
yarn add webcom-as-promised
bun add webcom-as-promised
```

## 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.2.3 |
| Published | 2018-09-15 |
| First published | 2018-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.1 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ehab Gamal |
| Maintainers | ehabgamal |
| Keywords | realtime, websocket, backendless, webcom, promise |

## Links

- npm: https://www.npmjs.com/package/webcom-as-promised
- Repository: https://github.com/EhabGamal/webcom-as-promised
- Homepage: https://github.com/EhabGamal/webcom-as-promised#readme
- Issues: https://github.com/EhabGamal/webcom-as-promised/issues
- npm.io page: https://npm.io/package/webcom-as-promised

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [webcom](https://npm.io/package/webcom.md) ^2.6.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.2.3 (latest) — 2018-09-15
- 1.2.2 — 2018-07-01
- 1.2.1 — 2018-06-14
- 1.2.0 — 2018-05-26
- 1.1.0 — 2018-05-25
- 1.0.0 — 2018-04-16

## README

# Webcom as Promised
### Promise wrapper for [Webcom](https://github.com/webcom-components/webcom-npm) library.

[![Build Status](https://travis-ci.org/EhabGamal/webcom-as-promised.svg?branch=master)](https://travis-ci.org/EhabGamal/webcom-as-promised)
[![Maintainability](https://api.codeclimate.com/v1/badges/bd0a561a6cbe13d3b5f5/maintainability)](https://codeclimate.com/github/EhabGamal/webcom-as-promised/maintainability)
[![npm](https://img.shields.io/npm/v/webcom-as-promised.svg)](https://github.com/EhabGamal/webcom-as-promised)
[![Webcom Version](https://img.shields.io/badge/webcom-v2.6.0-orange.svg)](https://github.com/webcom-components/webcom-npm)
[![Webcom Version](https://img.shields.io/npm/l/webcom-as-promised.svg)](https://github.com/EhabGamal/webcom-as-promised/blob/master/LICENSE)

> ### The promised wrapper that will protect you from falling into the callback hell.

## Installation
```
npm i webcom-as-promised
```

## Example
```node
const Webcom = require('webcom-as-promised');

const webcomRef = new Webcom('YOUR NAMESPACE URL');

webcomRef
  .authWithPassword({
    "email":"email@example.com",
    "password": "$0ME_P@$$W0RD"
  })
  .then((auth) => {
    console.log(`Whola! authed sucessfully!`);
    return webcomRef.child('sub_child').valueAsync();
  })
  .then((v) => v.val())
  .then((val) => console.log(`Value sub_child is ${val}`))
  .catch(console.log);
```

## Promisified APIs
| Callback API | Promise API |
|:--------:|:-------:|
|value|valueAsync|
|update|updateAsync|
|set|setAsync|
|remove|removeAsync|
|push|pushAsync|
|resume|resumeAsync|
|logout|logoutAsync|

## New APIs
1. `confirmEmail`
2. `resetPassword`
3. `getPathFromRoot`
4. `navigateFromRoot`

## Thanks
All thanks to [Mohamad Gamal](https://github.com/MohamadGamal) for his contribution in developing this wrapper.

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