# attempt-promise

> Promise wrapper for attempt

Latest version **3.0.0** (published 2025-07-11) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

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

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2025-07-11 |
| First published | 2015-11-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Martin Jonsson |
| Maintainers | martinj |
| Keywords | attempt, promise |

## Links

- npm: https://www.npmjs.com/package/attempt-promise
- Repository: https://github.com/martinj/node-attempt-promise
- Homepage: https://github.com/martinj/node-attempt-promise#readme
- Issues: https://github.com/martinj/node-attempt-promise/issues
- npm.io page: https://npm.io/package/attempt-promise

## Dependencies (1)

- [attempt](https://npm.io/package/attempt.md) ^1.0.1

## 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

- 3.0.0 (latest) — 2025-07-11
- 2.0.1 — 2016-04-12
- 2.0.0 — 2016-04-11
- 1.0.0 — 2015-11-25

## README

[![Build Status](https://travis-ci.org/martin/node-attempt-promise.svg)](https://travis-ci.org/martinj/node-attempt-promise)

# attempt-promise

A wrapper that returns promises for [attempt](https://github.com/TomFrost/node-attempt)

## Installation

	$ npm install attempt-promise

## Examples

Using node style callback function

```javascript
attempt({retries: 2}, function (cb) {
	cb(null, 'ok');
}).then(function (result) {
	console.log('Yes!', result);
});
```

Using a function that returns a promise

```javascript
attempt(function () {
	return Promise.resolve('ok');
}).then(function (result) {
	console.log('Yes!', result);
});
```

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