# extract-last-number

> Extract last number from given string. return array with the string without the number, and the number himself

Latest version **1.1.10** (published 2021-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install extract-last-number
pnpm add extract-last-number
yarn add extract-last-number
bun add extract-last-number
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.10 |
| Published | 2021-05-31 |
| First published | 2019-01-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Natan Farkash |
| Maintainers | natqe3 |
| Keywords | extract, last, number, extract-last, extract-number, last-extract, last-number, number-extract, number-last, extract-last-number, extract-number-last, last-extract-number, last-number-extract, number-extract-last, number-last-extract |

## Links

- npm: https://www.npmjs.com/package/extract-last-number
- Repository: https://github.com/natqe/utilizes
- Homepage: https://github.com/natqe/utilizes#readme
- Issues: https://github.com/natqe/utilizes/issues
- npm.io page: https://npm.io/package/extract-last-number

## 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

- 1.1.10 (latest) — 2021-05-31
- 1.1.9 — 2019-06-12
- 1.1.8 — 2019-01-20
- 1.1.6 — 2019-01-20
- 1.1.4 — 2019-01-19
- 1.1.3 — 2019-01-15
- 1.1.2 — 2019-01-15
- 1.1.0 — 2019-01-15
- 1.0.11 — 2019-01-15
- 1.0.4 — 2019-01-14
- 1.0.3 — 2019-01-13
- 1.0.2 — 2019-01-13
- 1.0.1 — 2019-01-13

## README

# extractLastNumber

Extract last number from given string. return array with the string without the number, and the number himself

**Usage:** `extractLastNumber(str: string): [string, number]`

```typescript
import { extractLastNumber } from 'extract-last-number'

extractLastNumber('name1')
// Output: ["name", 1]
extractLastNumber('name')
// Output: ["name", null]
extractLastNumber('name01')
// Output: ["name0", 1]
```

<!-- *keywords [] *keywordsend -->


This module exported from [utilizes](https://www.npmjs.com/package/utilizes) project.

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