# @resolve-es/valueof

> valueOf

Latest version **1.0.3** (published 2026-03-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @resolve-es/valueof
pnpm add @resolve-es/valueof
yarn add @resolve-es/valueof
bun add @resolve-es/valueof
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

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

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2026-03-07 |
| First published | 2026-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | fox |
| Maintainers | tj-commits |
| Keywords | mit, javascript, ecmascript, node, npm, valueOf, 10xly |

## Links

- npm: https://www.npmjs.com/package/@resolve-es/valueof
- Repository: https://github.com/10xly/valueOf
- Homepage: https://github.com/10xly/valueOf#readme
- Issues: https://github.com/10xly/valueOf/issues
- npm.io page: https://npm.io/package/@resolve-es/valueof

## Dependencies (8)

- [true-value](https://npm.io/package/true-value.md) ^3.0.0
- [false-value](https://npm.io/package/false-value.md) ^2.0.6
- [is-falsey-x](https://npm.io/package/is-falsey-x.md) ^1.0.3
- [to-boolean-x](https://npm.io/package/to-boolean-x.md) ^1.0.3
- [n0p3-es2015-cjs](https://npm.io/package/n0p3-es2015-cjs.md) ^1.0.1
- [noop-enterprise](https://npm.io/package/noop-enterprise.md) ^1.0.0
- [attempt-statement](https://npm.io/package/attempt-statement.md) 1.2.1
- [function.prototype.exec](https://npm.io/package/function.prototype.exec.md) ^1.0.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2026-03-07
- 1.0.2 — 2026-01-28
- 1.0.1 — 2026-01-24
- 1.0.0 — 2026-01-22

## README

# @resolve-es/valueof
Returns `x.valueOf()` if `x.valueOf` exists, otherwise returns `x`.

## Installation
```bash
npm install @resolve-es/valueof
```

## Usage
```js
const valueOf = require("@resolve-es/valueof")

const str = new String("Wow!")
console.log(typeof valueOf(str)) // "string"

// Handling primitives
console.log(valueOf(42)) // 42

// Complex objects without valueOf
console.log(valueOf({ name: "John Doe" })) // { name: 'John Doe' }
```

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