extract-last-number
v1.1.10 extract last number extract-last extract-number last-extract last-number number-extract number-last and 7 more...
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]
import { extractLastNumber } from 'extract-last-number'
extractLastNumber('name1')
// Output: ["name", 1]
extractLastNumber('name')
// Output: ["name", null]
extractLastNumber('name01')
// Output: ["name0", 1]
This module exported from utilizes project.
npm i extract-last-number
Metadata
- MIT
- Whatever
- Natan Farkash
- released 5/31/2021