# Is is-promise ESM-only? Can you require() it?

> is-promise@4.0.0 ships CommonJS and ESM builds. Dual package — require() works on every Node.js version we test; import works too.

Test whether an object looks like a promises-a+ promise

Last verified Sep 9, 2026 against is-promise@4.0.0.

is-promise publishes both a CommonJS entry and a native ESM entry (ESM added in 2.2.0). require("is-promise") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "is-promise" works alongside it.

## What to do

1. Nothing to change. require("is-promise") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import * as isPromise from "is-promise" works alongside it; use named imports for what the ESM entry exports.
2. TypeScript: npm install -D @types/is-promise

## Facts

- Latest: 4.0.0 (Apr 27, 2020)
- Module format: Dual (CommonJS + ESM)
- Last CommonJS version: 4.0.0
- Native ESM since: 2.2.0
- TypeScript types: @types/is-promise
- Node engines: not declared
- Weekly downloads: 75.1M
- License: MIT

## Runtime test results for is-promise@4.0.0

Installed and executed on Sep 9, 2026 with require("is-promise") from a CommonJS file and import "is-promise" from an ES module.

| Runtime | require("is-promise") | import "is-promise" |
|---|---|---|
| Node.js 18 | works | works |
| Node.js 20 | works | works |
| Node.js 22 | works | works |
| Node.js 24 | works | works |
| Node.js 26 | works | works |
| Bun 1.4.0 | works | works |

## How to import is-promise

ES modules:

```js
import * as isPromise from "is-promise";
```

Namespace import shown because the ESM entry may have no default export; use named imports for what it exports.

CommonJS:

```js
const isPromise = require("is-promise");
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (9 versions; the newest 9 shown).

| Versions | Format | First published |
|---|---|---|
| 3.0.0 – 4.0.0 | Dual (CommonJS + ESM) | Apr 26, 2020 |
| 2.2.2 | CommonJS | Apr 25, 2020 |
| 2.2.0 – 2.2.1 | Dual (CommonJS + ESM) | Apr 25, 2020 |
| 1.0.0 – 2.1.0 | CommonJS | Dec 23, 2012 |

## Frequently asked

**Is is-promise ESM-only?**

is-promise@4.0.0 ships CommonJS and ESM builds. is-promise publishes both a CommonJS entry and a native ESM entry (ESM added in 2.2.0). require("is-promise") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun. import "is-promise" works alongside it.

**Can I require is-promise?**

Yes. is-promise ships a CommonJS entry alongside the native ESM entry. require("is-promise") works on every Node.js version we test (18, 20, 22, 24 and 26) and in Bun.

**Does is-promise work in Bun?**

Yes. import "is-promise" loaded successfully in Bun 1.4.0 on Sep 9, 2026.

**Does is-promise ship TypeScript types?**

Not bundled. Install the community types with "npm install -D @types/is-promise".

## Links

- [is-promise on npm](https://www.npmjs.com/package/is-promise)
- [Source repository](https://github.com/then/is-promise)
- [HTML version](https://canirequire.com/package/is-promise/)
- [JSON version](https://canirequire.com/package/is-promise.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
