# promise-peek

> Augmentation to ES6 Promise, that allows to peek at the promise results without interfering

Latest version **1.0.1** (published 2017-12-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install promise-peek
pnpm add promise-peek
yarn add promise-peek
bun add promise-peek
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-12-25 |
| First published | 2017-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | hypescript |
| Keywords | promise |

## Links

- npm: https://www.npmjs.com/package/promise-peek
- Repository: git@github.com:hypescript/promise-peek
- npm.io page: https://npm.io/package/promise-peek

## Dependencies (1)

- [typescript-optional](https://npm.io/package/typescript-optional.md) ^1.4.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

- 1.0.1 (latest) — 2017-12-25

## README

# Promise peek
[![Build Status](https://travis-ci.org/hypescript/promise-peek.svg?branch=master)](https://travis-ci.org/hypescript/promise-peek.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/hypescript/promise-peek/badge.svg?branch=master)](https://coveralls.io/github/hypescript/promise-peek?branch=master)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)

Augmentation to ES6 Promise, that allows to peek at the promise results without interfering.

# Using this module in other modules

In order to augment your Promises with the peek method, you'll need to import this module:

```typescript
import "promise-peek";

new Promise((resolve, reject) => dice('1d6') === 6 ? reject('Fail!') : resolve('Success!'))
    .peek(console.info, console.error)
    .then(result => console.log(`It's a ${result}`))
    .catch(error => console.log(`It's a ${error}`))
  
```

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