# @urban/is-promise

> Tests whether an Object is a promise/A+ promise.

Latest version **0.1.0** (published 2015-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @urban/is-promise
pnpm add @urban/is-promise
yarn add @urban/is-promise
bun add @urban/is-promise
```

## 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.1.0 |
| Published | 2015-11-29 |
| First published | 2015-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Urban Faubion |
| Maintainers | urban |
| Keywords | ES6, ES7, ES2015, ES2016 |

## Links

- npm: https://www.npmjs.com/package/@urban/is-promise
- Repository: https://github.com/urban/is-promise
- Issues: https://github.com/urban/is-promise/issues
- npm.io page: https://npm.io/package/@urban/is-promise

## Recent versions

- 0.1.0 (latest) — 2015-11-29

## README

# is-promise

Tests whether an Object is a promise/A+ promise.


## Install

```sh
npm i @urban/is-promise
```


## Usage

```js
import isPromise from '@urban/is-promise'

function noop () {}
const promise = new Promise(noop, noop)
const promiseLookalike = { then: function () {} }
function * gen () {}

isPromise(promise)          // => true
isPromise(promiseLookalike) // => true
isPromise(gen)              // => false
isPromise(null)             // => false
isPromise(undefined)        // => false
isPromise(noop)             // => false
isPromise([])               // => false
isPromise({})               // => false
isPromise('str')            // => false
```


## License

[The MIT License (MIT)](LICENSE). Copyright (c) [Urban Faubion](http://urbanfaubion.com).

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