# bare-type

> Cross-realm type predicates for Bare

Latest version **1.2.0** (published 2026-09-22) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install bare-type
pnpm add bare-type
yarn add bare-type
bun add bare-type
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2026-09-22 |
| First published | 2024-04-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 509.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3 |
| Author | Holepunch |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/bare-type
- Repository: https://github.com/holepunchto/bare-type
- Homepage: https://github.com/holepunchto/bare-type#readme
- Issues: https://github.com/holepunchto/bare-type/issues
- npm.io page: https://npm.io/package/bare-type

## Recent versions

- 1.2.0 (latest) — 2026-09-22
- 1.1.1 — 2026-09-01
- 1.1.0 — 2025-10-24
- 1.0.8 — 2025-08-21
- 1.0.7 — 2025-08-14
- 1.0.6 — 2024-11-28
- 1.0.5 — 2024-10-20
- 1.0.4 — 2024-09-13
- 1.0.3 — 2024-09-11
- 1.0.2 — 2024-09-02
- 1.0.1 — 2024-08-29
- 1.0.0 — 2024-04-17

## README

# bare-type

Cross-realm type predicates for Bare.

```
npm i bare-type
```

## Usage

```js
const type = require('bare-type')

if (type(123).isNumber()) {
  console.log(123, 'is a number')
}
```

## API

See the [`bare-type` reference](https://docs.pears.com/reference/bare/modules/bare-type).

## Threat model

`bare-type` is one of the addons Bare compiles into its binary, so it inherits [Bare's threat model](https://github.com/holepunchto/bare/blob/main/docs/threat-model.md). See [`docs/threat-model.md`](docs/threat-model.md) for where this addon sits in it.

## License

Apache-2.0

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