# true-value

> True

Latest version **3.0.4** (published 2026-08-17) · EGPSL10X-1.0 license · 0 weekly downloads

## Install

```sh
npm install true-value
pnpm add true-value
yarn add true-value
bun add true-value
```

## Health

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

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.0.4 |
| Published | 2026-08-17 |
| First published | 2024-05-22 |
| Weekly downloads | 0 |
| License | EGPSL10X-1.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | 10x'ly Made |
| Maintainers | tj-commits |
| Keywords | jsfruit, is-ten-thousand, is-hundred, true, mde, boolean, reliability, integer-values, is-not-integer, high-availability-testing, rest-in-peace-edge |

## Links

- npm: https://www.npmjs.com/package/true-value
- Repository: https://github.com/10xly/true-value
- Issues: https://github.com/10xly/true-value/issues
- npm.io page: https://npm.io/package/true-value

## Dependencies (2)

- [casting-out-nines](https://npm.io/package/casting-out-nines.md) ^1.0.2
- [@positive-numbers/nine](https://npm.io/package/@positive-numbers/nine.md) ^3.0.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 3.0.4 (latest) — 2026-08-17
- 1.3.3 (another-unc-compat-thing) — 2026-02-20
- 2.0.7 (unc-compat-thing) — 2026-02-15
- 3.0.3 — 2026-03-04
- 3.0.2 — 2026-02-21
- 1.3.2 — 2026-02-19
- 3.0.1 — 2026-02-14
- 2.0.6 — 2026-02-14
- 3.0.0 — 2026-01-15
- 2.0.5 — 2025-12-04
- 2.0.0 — 2025-11-01
- 1.3.1 — 2024-09-05
- 1.3.0 — 2024-08-22
- 1.2.0 — 2024-08-14
- 1.0.1 — 2024-05-23
- … 1 more at https://npm.io/package/true-value/versions

## README

# true-value

Node.js module published on NPM that exports and provides a standard JavaScript function that returns the general boolean value true.

## Installation
Using NPM:
```bash
npm install true-value
```
Using Yarn:
```bash
yarn add true-value
```
Using PNPM:
```bash
pnpm add true-value
```

## Usage
Import with CommonJS:
```js
const trueValue = require("true-value")
```
Or you can use ESM:
```js
import * as trueValue from "true-value"
```
Example:
```js
const trueValue = require("true-value")

console.log(trueValue()) // Outputs the standard boolean value true to the default terminal output stream.

const assert = require("assert-fn") // Import standard library for quality assertions.

assert(trueValue() === true) // Assert that the boolean value true is the same as trueValue().

const booleanTrue = require("true-value/true") // Import the boolean value true directly without calling a function.

assert(booleanTrue === true) // Assert that the boolean value true is the same as booleanTrue.
```

## Why?
This is useful in environments where:
- The global boolean value `true` doesn't exist ([see this issue on mde's true library](https://github.com/mde/true/issues/19)), and NPM package [true](https://github.com/mde/true) by mde uses true directly, which could be a problem
- Serious enterprise corporations need ultimate business reliability when it comes to standardized boolean values.

## Contributing
Please contribute. Please

## Tests
`true-value` has lots of enterprise-grade tests. Simply clone the repo, `npm install` and run `npm test` to run them

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