# @bemoje/math-log10-approx

> Approximate the logarithm base 10 of a small integer.

Latest version **1.1.1** (published 2020-04-30) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @bemoje/math-log10-approx
pnpm add @bemoje/math-log10-approx
yarn add @bemoje/math-log10-approx
bun add @bemoje/math-log10-approx
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2020-04-30 |
| First published | 2020-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Benjamin M. Jensen |
| Maintainers | bemoje |
| Keywords | approximate, logarithm, base, small, integer, approximated, mathlog10approx |

## Links

- npm: https://www.npmjs.com/package/@bemoje/math-log10-approx
- Repository: https://github.com/bemoje/bemoje-math-log10-approx
- Homepage: https://github.com/bemoje/bemoje-math-log10-approx#readme
- Issues: https://github.com/bemoje/bemoje-math-log10-approx/issues
- npm.io page: https://npm.io/package/@bemoje/math-log10-approx

## Dependencies (3)

- [@bemoje/assert-args](https://npm.io/package/@bemoje/assert-args.md) ^1.0.0
- [@bemoje/assert-type](https://npm.io/package/@bemoje/assert-type.md) ^1.0.0
- [@bemoje/math-pow10-pre-computed](https://npm.io/package/@bemoje/math-pow10-pre-computed.md) ^1.0.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2020-04-30
- 1.1.0 — 2020-04-28
- 1.0.0 — 2020-04-28

## README

# @bemoje/math-log10-approx

Approximate the logarithm base 10 of a small integer.

#### Version

<span><a href="https://npmjs.org/@bemoje/math-log10-approx" title="View this project on NPM"><img src="https://img.shields.io/npm/v/@bemoje/math-log10-approx" alt="NPM version" /></a></span>

#### Travis CI

<span><a href="https://npmjs.org/@bemoje/math-log10-approx" title="View this project on NPM"><img src="https://travis-ci.org/bemoje/bemoje-math-log10-approx.svg?branch=master" alt="dependencies" /></a></span>

#### Dependencies

<span><a href="https://npmjs.org/@bemoje/math-log10-approx" title="View this project on NPM"><img src="https://david-dm.org/bemoje/bemoje-math-log10-approx.svg" alt="dependencies" /></a></span>

#### Stats

<span><a href="https://npmjs.org/@bemoje/math-log10-approx" title="View this project on NPM"><img src="https://img.shields.io/npm/dt/@bemoje/math-log10-approx" alt="NPM downloads" /></a></span>
<span><a href="https://github.com/bemoje/bemoje-math-log10-approx/fork" title="Fork this project"><img src="https://img.shields.io/github/forks/bemoje/bemoje-math-log10-approx" alt="Forks" /></a></span>

#### Donate

<span><a href="https://www.buymeacoffee.com/bemoje" title="Donate to this project using Buy Me A Beer"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?label=Buy me a beer!" alt="Buy Me A Beer donate button" /></a></span>
<span><a href="https://paypal.me/forstaaloen" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg?label=PayPal" alt="PayPal donate button" /></a></span>

## Installation

```sh
npm install @bemoje/math-log10-approx
npm install --save @bemoje/math-log10-approx
npm install --save-dev @bemoje/math-log10-approx
```

## Usage

```javascript
import mathLog10Approx from '@bemoje/math-log10-approx'

//=> undefined
log10(0)
//=> 0

log10(1)
//=> 0

log10(5)
//=> 0

log10(10)
//=> 1

log10(100)
//=> 2

log10(1000)
//=> 3

log10(10000)
//=> 4

log10(105000)
//=> 5

log10(1000200)
//=> 6

log10(10000010)
//=> 7

log10(100051000)
//=> 8

log10(1005100000)
//=> 9

log10(10055100727920584576600)
//=> 9

log10(100551007279206235576600)
//=> 9

```


## Tests
Uses *Jest* to test module functionality. Run tests to get coverage details.

```bash
npm run test
```

## API
#r

---
_Source: https://npm.io/package/@bemoje/math-log10-approx · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
