# recursive-min

> Returns the smallest number from a multidimensional array or object.

Latest version **0.1.0** (published 2016-01-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install recursive-min
pnpm add recursive-min
yarn add recursive-min
bun add recursive-min
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-01-02 |
| First published | 2016-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Marin Atanasov |
| Maintainers | tyxla |
| Keywords | min, minimum, smallest, number, recursive, recursion, small, object, array |

## Links

- npm: https://www.npmjs.com/package/recursive-min
- Repository: https://github.com/tyxla/recursive-min
- Issues: https://github.com/tyxla/recursive-min/issues
- npm.io page: https://npm.io/package/recursive-min

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-01-02

## README

# recursive-min

Returns the smallest number from a multidimensional array or object.

```
npm install recursive-min
```

[![Build Status](https://travis-ci.org/tyxla/recursive-min.svg)](https://travis-ci.org/tyxla/recursive-min)

## About

An easy to use solution for finding the smallest number from a multidimensional array or object.

Arrays and objects are traversed recursively, number values are compared, the rest are skipped.

Returns `false` on failure

## Syntax

``` js
recursiveMin(objOrArray)
```

#### objOrArray

Object or array to fetch the minimum number from.

#### min

Optional. Use it to specify a temporary minimum value.

## Usage

Call `recursiveMin()` by passing the array or object you wish to find the smallest number from. If you specify `min`, it will be the maximum possible result.

``` js
var input = [0, 12, [4, -5]];
var min = recursiveMin(input);

console.log(min); // -5
```

## License

MIT

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