# @promises/to-observable

> To Observable is package from Promises library

Latest version **0.5.0** (published 2018-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @promises/to-observable
pnpm add @promises/to-observable
yarn add @promises/to-observable
bun add @promises/to-observable
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2018-07-16 |
| First published | 2017-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 30 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Yisrael Eliev |
| Maintainers | yisraelx |
| Keywords | promise, promises, utilities, utility, utils, modules, modular, async, await, deferred |

## Links

- npm: https://www.npmjs.com/package/@promises/to-observable
- Repository: https://github.com/yisraelx/promises
- Homepage: https://github.com/yisraelx/promises#readme
- Issues: https://github.com/yisraelx/promises/issues
- npm.io page: https://npm.io/package/@promises/to-observable

## Dependencies (1)

- [@promises/core](https://npm.io/package/@promises/core.md) ^0.5.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.5.0 (latest) — 2018-07-16
- 0.4.0 — 2018-03-17
- 0.3.1 — 2018-03-05
- 0.3.0 — 2018-03-05
- 0.2.0 — 2017-09-20
- 0.1.0 — 2017-06-24

## README

# @promises/to-observable
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/promises/blob/master/modules/to-observable)
[![Version](https://img.shields.io/npm/v/@promises/to-observable.svg)](https://www.npmjs.com/package/@promises/to-observable)
[![MIT License](https://img.shields.io/npm/l/@promises/to-observable.svg)](https://github.com/yisraelx/promises/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@promises/to-observable.svg)](https://bundlephobia.com/result?p=@promises/to-observable)

**To Observable is package from Promises library**

## Use

**Module**
```sh
$ npm install --save @promises/to-observable
```
```typescript
import {
 default as toObservable
} from '@promises/to-observable';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/to-observable/bundle.umd.min.js"></script>
```
```typescript
let {
 toObservable
} = P;
```


**Examples**
```typescript
 let promise: Promise<string> = Promise.resolve('foo');
 let observable: Observable<string> = toObservable(promise);

 observable.subscribe((result: string) => {
     console.log(result); // result => 'foo'
 });
```



### Wrapper

**Module**
```sh
$ npm install --save @promises/to-observable
```
```typescript
import Promises from '@promises/core';
import '@promises/to-observable/add';
```
*Or*
```typescript
import Promises from '@promises/to-observable/add';
```

**Browser**
```html
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/to-observable/add/bundle.umd.min.js"></script>
```
```typescript
let {
 Promises
} = P;
```


**Examples**
```typescript
 let promises: Promises<string> = Promises.resolve('foo');
 let observable: Observable<string> = promises.toObservable();

 observable.subscribe((result: string) => {
     console.log(result); // result => 'foo'
 });
```


## Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global __Promise__ (native or polyfill).

## License
Copyright © 2017 [Yisrael Eliav](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/promises/blob/master/LICENSE).

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